WAMP Server - Open Source
Jeff Walters March 20th, 2007
The wamp server is a must for the Web developer looking for a easy to use testing environment. It contains Apache, PHP and MySQL; including a services manager. The Windows version of PHP doesn’t have all of the bells and whistles that you can normally get with a Linux version, but it’s pretty good for testing applications.
The frist thing you’ll need to do is to locate the php.ini file. This can be accessed through the services manager; small half moon icon on the Windows toolbar. Once you have the php.ini file open, you’ll want to make a couple of changes. First, you’ll want to allow short tags for PHP code. That is,
<? … ?>
Instead of the long way,
<?php … ?>
Of course, the second is better coding practice. Search the php.ini file for short_open_tag and make sure it’s set to ‘On’.
short_open_tag = On
Next, search for ‘max_execution_time’. I do a bit of coding that typically runs a while, so I like to adjust the execute time for the PHP scripts. I also like to allow for more memory usage; 32 MB is usually good for most scripts.
max_execution_time = 300
max_input_time = 600
memory_limit = 32M
Error reporting is another good setting to adjust. If you are going to use the WAMP server for a testing environment, you’ll probably want to see all errors and notices.
error_reporting = E_ALL
display_errors = On
log_errors = On
If you’re working with some older PHP scripting, you may have to turn on the register_long_arrays for arrays such as HTTP_GET_VARS and HTTP_POST_VARS. You will most likely also need to have magic quotes turned on, so your input is escaped automatically.
register_long_arrays = On
magic_quotes_gpc = On
You may also wish to adjust the maximum file upload size. The default is a measily 2MB. But, don’t raise this too high or you’ll run out of memory for PHP.
upload_max_filesize = 8M
I recommend keeping this setting under the 16 MB range for most production servers. Anything larger should be managed through an FTP program or some other special program allowing an FTP protocol.
Just some thoughts… Hope they helped.
Jeff Walters