You might know about the LAMP(Linux,Apache, MySQL, and PHP) and that is not much deal when you just develop a web application in that environment. Now I need to set a web server with PHP engine to test out my web application. And I have found out my old windows XP system that can hold web server with PHP enoughly. So, I have started to install Apache and it is running fine without any issue. For example I can run default page without any problem.
You can download from Apache when site http://httpd.apache.org/ and the simple way is get the MSI installation file. What I got is httpd-2,2,22-win32-x86-no_ssl . After that, I have downloaded the PHP from http://php.net/manual/en/install.windows.apache2.php . After the PHP installation you have to add below string sets into the httpd.conf file.
# LoadModule php5_module "c:/php/php5apache2.dll" AddHandler application/x-httpd-php .php # configure the path to php.ini PHPIniDir "C:/php"
For the more, I have copied paste more detail steps in the below;
Installing Apache and PHP on Windows 7 Home Premium on a Gateway NV75S laptop with a quad AMD A6-3400M All I need to do with these programs is to test my website out on my laptop. I have HTML and PHP files. I do not need MySQL as I use html5 storage. Getting and installing Apache 1 In your browser go to h t t p : / / h t t p d . a p a c h e . o r g / d o w n l o a d . c g i (without the spaces) 2 Click on httpd-2.2.22-win32-x86-no_ssl.msi (this is a self-installing executable file without crypto ... no Secure Socket Layer) (2.2.22 was the latest version on April 25, 2012) 3 Click on the httpd-2.2.22-win32-x86-no_ssl.msi file after it downloads (single click on the file tab in Chrome or double click on the actual file in Downloads) 4 Click Next 5 Click I accept the terms in the license agreement 6 Click Next 7 Click Next 8 Type localhost in the top box 9 Type localhost in the middle box 10 Type email@example.com in the bottom box 11 Click Next 12 Click Next 13 Click Next 14 Click Install and wait 15 Cick Yes to allow the program to make changes 16 Click Finish Testing Apache 1 Type localhost in your browser location box (I use Chrome) or type h t t p : / / l o c a l h o s t (without the spaces) 2 The message It works! should appear. Getting and installing PHP 1 In your browser go to h t t p : / / w i n d o w s . p h p . n e t / d o w n l o a d / (without the spaces) 2 Click on the Installer link under PHP 5.3 (5.3.10) VC9 x86 Thread Safe (Ignore the Do NOT use VC9 version with apache.org binaries comment on the side panel) 3 Click on the php-5.3.10-Win32-VC9-x86.msi file after in downloads (single click on the file tab in Chrome or double click on the actual file in Downloads) 4 Click Next 5 Click I accept the terms in the License Agreement 6 Click Next 7 Click Next 8 Click Apache 2.2.x Module 9 Click Next 10 Click Browse 11 Double click Apache Software Foundation 12 Double click Apache 2.2 13 Double click conf 14 Click OK 15 Click Next 16 Click Next 17 Click Install and wait 18 Cick Yes to allow the program to make changes 19 Click Finish Testing PHP with Apache 1 Open Notepad 2 Type 'left bracket character'?php phpinfo(); ?'right bracket character' 3 Save the file to C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs as test.php 4 Type localhost/test.php in your browser location box (I use Chrome) or type h t t p : / / l o c a l h o s t / t e s t . p h p 5 A table with title PHP Version ... should appear DONE
I followed exactly same steps as above for many hours and the result was failed.
While I was starting the apache server it is keep on saying “… can’t load PHPxxx.dll driver …..” . Then, I had to try out many different ways based on my google search. But whatever I did, I could not be able to make it work at all.
The installation was really simple and easy but none of them was successful to run PHP with Apache web server. The error message was very close as above message.
And I have noticed the system should be installed Microsoft C++ 2008 runtime libraries that is from http://www.microsoft.com/en-us/download/confirmation.aspx?id=5582 .
After installing above driver, it is working fine. So, all of above failures could be successful with installing Microsoft C++ 2008 runtime libraries.