Customer Login

Recover Password

WorkOrder TS Support Database


Bookmark: Root \ Installation Guides \ Part III - Install PHP 5.3 and integrate it with Apache 2.4

Part III - Install PHP 5.3 and integrate it with Apache 2.4

Last Updated: 2012-05-10
This is Part III of a three part guide on how to install Apache2, PHP 5 and MySQL on a Windows computer or server.
Part I covers the Apache 2.4 Web Server
Part II covers the MySQL Database Server
Part III covers the PHP 5.3 installation

PART III - Install PHP5 and integrate it with Apache 2.0, 2.2 or 2.4

Extract the downloaded zip file containing PHP, rename it to PHP and move it to C:\

Now we need to add C:\php to the Windows Path. This is the recommended way, DO NOT follow other instructions!
14. How do I add my PHP directory to the PATH on Windows?
(Source )

On Windows NT, 2000, XP and 2003:
-Go to Control Panel and open the System icon (Start -> Settings -> Control Panel -> System, or just Start -> Control Panel -> System for Windows XP/2003). You might have to click on "Switch to Classic View" on the top left corner to see "System"!
-Go to the Advanced tab
-Click on the 'Environment Variables' button
-Look into the 'System Variables' pane
-Find the Path entry (you may need to scroll to find it)
-Double click on the Path entry
-Enter your PHP directory ant the end, including ';' before (e.g. ;C:\php)
-Press OK and restart your computer
Note: Be sure to reboot after following the steps above to ensure that the PATH changes are applied.

Now it is time to configure PHP.
You will find two sample configuration files inside the PHP 5 directory, C:\php.
Delete php.ini-development and copy the file php.ini-production to php.ini

Open php.ini with Notepad and search for "extension_dir", change the line to
extension_dir = "./ext/"

Keep php.ini open and look for extension=php_mysql.dll and extension=php_mysqli.dll
Remove the ; in front of the lines, save and close the file.

Now it's time to configure Apache to work with PHP.
WARNING: Ensure you follow the instructions below. Apache expects forward slashes instead of backslashes!
Apache 2.0:

Use Notepad to open the file C:\Apache2\conf\httpd.conf. Search the file for the string "LoadModule" and add these lines below.
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php"

Apache 2.2:

Use Notepad to open the file C:\Apache2.2\htdocs\httpd.conf. Search the file for the string "LoadModule" and add these lines below.
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php"

Apache 2.4:

You need to download from Apachelounge, extract the files and copy php5apache2_4.dll into C:\PHP

Use Notepad to open the file C:\Apache24\htdocs\httpd.conf. Search the file for the string "LoadModule" and add these lines below.
LoadFile "C:/php/php5ts.dll"
LoadModule php5_module "c:/php/php5apache2_4.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php"

The default Apache configuration has directory indexes enabled which displays the directory content if no index file is found. This is fine for a development server but not for production use.. Locate the <Directory> section handling your htdocs directory and remove the command Indexes
The configuration line should now read Options FollowSymLinks

Save the configuration file and restart Apache 2.
Create the file info.php in your htdocs directory.
Edit info.php and enter the code below.
<?PHP phpinfo(); ?>

Now it's time to test the php installation. Open your web browser and navigate to http://localhost/info.php if you did everything as shown above you should see the screen below and should now be ready to install WorkOrder TS


Problem: You receive a PHP error message that you MySQL extension has not been found.

The solution to this problem is usually to correct incorrect path entries, make sure that your MySQL and PHP paths point to the correct directories on your hard drive. If this does not work, copy the file libmysql.dll from your PHP directory into your %windir%\system32 directory. Don't forget to restart when you change the Windows PATH

Once fixed you should find this entry when opening info.php

This guide has been written by WorkOrder to provide a simple step by step guide on how to get Apache 2.4, MySQL 5 and PHP 5.3 to talk to each other. You did not write it so please don't copy the content!
Feel free to link to it using the tiny URL:


No Comments yet .....


Add Your Comment:

Note: All posts require administrator approval. Please allow 24 hours for message approval.

Plain text only, less then 65 000 characters.

Which one of the following 6 words is a feeling? Words: beer book math bottle fear export

Please answer the question above and type the answer into the text box below.