I already have an Apache server (2.2.22) up and running on my local machine, and have been using it to serve back static content. I am now trying to install PHP (5.2+) so I can get Apache serving back dynamic content, and am running into a snag.
I went directly to PHP's site and tried to download the Windows binary for 5.4.0. The installation instructions were confusing and wanted me to grab a WIX tool for some reason so I could then simulate an MSI installer (at the least thats what I gathered). So after about an hour of frustration, I abandoned that approach an instead went to SourceForge where I found this nifty MSI, which I know isnt a recommended/endorsed practice by the people at PHP for security/performance reasons, but I'm not running a Top 100 e-commerce site here...I'm just trying to get PHP up and running on my local machine for development purposes.
When I ran that MSI, one of the first windows asks me which server I want to install PHP for. It listed the following options:
- Other CGI
- Do not install a web server
I choose "Other CGI", under the premise that it was the correct choice for a WAMP stack setup (which is what I am aiming to achieve). After that, I just chose all the defaults/recommended settings and finished the installation. I now see PHP "installed" under
I expected that - after choosing "Other CGI" - it would have asked me to configure the PHP installation with my Apache instance (installed under
C:\Program Files\Apache Software Foundation\Apache2.2\). But this was not the case, so my first question is:
- Was I wrong to choose "Other CGI", and if so, how do I correct that mistake?
Assuming I was correct to do this, then the only conclusion I can draw is that I must now manually go into PHP and configure/point it to work nicely with my Apache server. So my second question is:
- If I do need to manually configure PHP, what is my next step here (can someone point me to the correct documentation, etc.)? And, if no manual configuration is necessary, then how do I get Apache serving back PHP pages?!?
To test Apache/PHP, I made the following
<? phpinfo(); ?>
When I go to
localhost/test.php it just gives me that same exact line of text (above), instead of displaying the normal/proper PHP Info page, which (obviously) indicates PHP is not working with Apache yet. Thanks in advance for any nudges in the right direction or helpful pointers!