I have searched in these posts and all over the internet for a solution to my problem, which I have not been able to find. I have installed the WAMP combo several times in the past and this is the first time I have had a problem.
I am running Vista Home Premium 64 bit and trying to install PHP 5.2.6 on Apache 2.2.1. Apache installed fine and can be run; however, when I add the LoadModule and other PHP commands to the Apache hppd.conf file, I get a fail-to-start error along with:
"The Apache service named reported the following error:
>>> httpd.exe: Syntax error on line 128 of C:/apache64/conf/httpd.conf: Cannot load C:/php/php5apache2_2.dll into server: The Apache service named is not a valid Win32 application."
Apache is in c:/apache64; PHP is in c:/php. The following is what I have done so far to no avail.
1) Added to/changed in hppd.conf:
ServerRoot "c:/apache64"
DocumentRoot "c:/apache64/htdocs"
LoadModule php5_module "c:/php/php5apache2_2.dll"
PHPIniDir "c:/php"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
2) Changed where necessary the directory to "c:/php"
3) Added c:\php to PATH
I can post the entire config file if necessary (without the comments). It's been three days now and I'm about to give up. If anyone can offer suggestions as to what I'm doing wrong I would be very grateful.
PHP5 with Apache2.2
Moderator: General Moderators
Re: PHP5 with Apache2.2
1. make sure your Apache is running. http://localhost if you see "it works", then Apache is up.
2. make sure your php is up. Go to command prompt and run php -version. if you see the version number of your php, then your php is working. if not them go back and reinstall php.
3. add the following codes to Apache httpd
#php
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php .html
4. restart Apache server. Good Luck
2. make sure your php is up. Go to command prompt and run php -version. if you see the version number of your php, then your php is working. if not them go back and reinstall php.
3. add the following codes to Apache httpd
#php
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php .html
4. restart Apache server. Good Luck