Installing PHP5 and Apache
Have you ever been frustrated by trying unsuccessfully to install PHP on an Apache web server? If so, this guide is for you.
Installing PHP is different depending on the version you want and which operating system/web server you want to install to. This article covers a module installation of Apache on Windows.
Windows and Apache
Download the Apache web server from here. You want the current stable release with the no_src.msi extension. Install the program user the installer. Most of the installation will be straightforward. During the installation, you have the choice of installing Apache as a service (available from the taskbar) or from the command line.
Download the PHP binary archive and extract it into any directory you want. C:\PHP is a popular choice.
Copy php5ts.dll into the Windows directory. (or the corresponding one according to your PHP version)
Copy either php.ini-dist or php.ini-recommended to your Windows directory and name it php.ini.
Add the following lines to your Apache configuration (Apache Group\Apache\conf\httpd.conf)
For PHP4
LoadModule php4_module "c:/php/php4apache.dll"
AddModule mod_php4.c
AddType application/x-httpd-php .php .phtml
For PHP5
LoadModule php5_module "c:/php/php5apache.dll"
AddModule mod_php5.c
AddType application/x-httpd-php .php .phtml
Restart the Apache Web Server (using command prompt or the start menu (under Apache HTTP Server)
You now have a working Windows Apache installation with PHP.
Finishing Up
Now, goto your htdocs folder under the Apache folder. Place your web files in there. View your webpage by typing localhost in the browser url.

| Price: | Free FREE | Hits: | 40 |
| File Size: | Platforms: | Windows | |
| Ratings: | Last Updated: | 2006-07-11 |
VIEW ALL
PHP Tutorials