WAMP Installation (PHP 5.2.x, Apache 2.2.x, MySQL 5.0.x)
Download the required packages. Just so to let you know, the specific versions of the packages I will be using is php 5.2.6, Apache 2.2.8, and MySQL 5.0.51b.
- php 5.2.x (Download the zip package)
- Apache 2.2.x
- MySQL 5.0.x (Download the Zip/Setup.exe)
Next, we would be installing PHP5. Extract the files in a folder of your choice (I used "D:\php5". Make sure you remember where you extract the files.) Now, go to the folder where you extracted the files and rename the file "php.ini-recommended" to "php.ini". Now, open the folder where Apache is installed (mine is "D:\program files\apache software foundation\apache2.2\"), then open up the folder "conf". Edit the file "httpd.conf" with notepad. Add these lines at the bottom of the file:
LoadModule php5_module "d:/php5/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "d:/php5"
Just change the path in the "LoadModule" and "PHPIniDir". Then, save the file. Now, let's test if our Apache Server can communicate with PHP. Go back to the folder where Apache is installed and open up the folder htdocs (this is were you store your web pages/files, you can change this in the "httpd.conf" file). Create a file named "phpinfo.php", open it up using notepad, and enter this line:
<?php phpinfo(); ?>
After that, restart Apache and open up your browser and type in "localhost/phpinfo.php".
Lastly, we would be installing MySQL. Extract the setup file found on the zip file and run it. Follow step by step instructions of the setup file such as setting up a root password. If you're not familiar with the options provided, just click on "next" and leave the default values (except for the password, of course). If installation is successful, open up the "php.ini" file I've mentioned a while ago using notepad. Change the line:
extension_dir = './' to extension_dir = 'D:\php5\ext' (depends on where you extracted php)
Then look for the line:
;extension=php_mysql.dll
Just uncomment the line by removing the semicolon (";"). Then save the file.
When all is done, the last thing we need to do is to add the php folder in our path. Right click "My Computer", go to "properties", go to the "Advanced" tab, and click on "Environment Variables". Select "Path" found on the "System Variables" and click on the edit button. Add at the end of the line the path where your php folder is (again, mine is "D:\php5"). Click on "Okay" and restart your computer.
Success!
0 comments:
Post a Comment