1.) Get apache 2.2 from http://httpd.apache.org I prefer that you download the one with ssl
2.) Next, get PHP from http://ph.php.net/get/php-5.2.8-Win32.zip/from/a/mirror. I am downloading PHP 5.2.8.8 windows binaries in ZIP file not the installer
3.) Next get mysql from http://dev.mysql.com/downloads I got mysql 5.1 community edition essentials
4.) wait for them to finish
5.) Install apache normally first. I installed mine on C:\apache you can use the default
6.) Next install MySQL you would want to configure the root password
7.) extract PHP somewhere, I did mine in C:\PHP
8.) add this to httpd.conf that is in C:\apache\conf:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php"
9.) restart apache
10.) create this as index.php in your C:\apache\htdocs folder:
phpinfo();
?>
11.) open a browser and point to: http://localhost/index.php
12.) in the line: Loaded Configuration File you will find that there is none loaded so in your c:\php directory rename php.ini-recommended to php.ini. open the file and uncomment the line extension=php_mysql.dll it's around line 681. also, don't forget to change the extension_dir around line 542 to read :
extension_dir="C:/php/ext"
13.) restart apache again
14.) check again http://localhost/index.php as you can see, mysql is not included in there.
15.) to enable mysql in php:
I. copy the file libmysql.dll from the directory where you install mysql usually in C:\Program Files\MySQL
to C:\php
II. you need to put mysql's bin path to the PATH environment variable the same with C:\php
III. at this point you need to restart
IV. check again at http://localhost/index.php and you should see mysql already there
16.) Edit again c:\apache\conf\httpd.conf the line:
DirectoryIndex index.html
should now read:
DirectoryIndex index.php index.html
17.) Restart apache and now you are done!
14.1.09
Subscribe to:
Posts (Atom)