Trying to configure PHP and Apache

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
paulz49
Forum Newbie
Posts: 4
Joined: Wed Jan 19, 2005 7:32 am
Location: Gateshead United Kingdom

Trying to configure PHP and Apache

Post by paulz49 »

Hello As a PHP newbie I'm having problems getting PHP to link with Apache web server - using Apache 2 PHP version 4.3.3 and Windows XP
I've installed Apache ok - I can display the welcome page ok with http://localhost/
When I type in http://localhost/phpinfo.php to display opening PHP I get
Error 404 page cannot be found.
I have added a phpinfo.php file to the Apache Web Server in my
C:\Program Files\Apache Group\Apache2\htdocs folder
I have added to the httpd conf file the following
#LoadModule php4_module c:/php/php4apache2.dll
and
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .phtml
I would appreciate any help - thank you
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

is the # in front of LoadModule a posting error? That's a comment in httpd.conf normally.
paulz49
Forum Newbie
Posts: 4
Joined: Wed Jan 19, 2005 7:32 am
Location: Gateshead United Kingdom

Post by paulz49 »

Hi feyd

Thanks for your reply - I have tried your suggestion of removing the # in front of the Load module line in the httpd.conf file but still get 'page cannot be found' when entering //localhost/phpinfo.php into my web browser.
I doublechecked to make sure phpinfo.php file is in
C:\Program Files\Apache Group\Apache2\htdocs
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you did restart apache, yes?
paulz49
Forum Newbie
Posts: 4
Joined: Wed Jan 19, 2005 7:32 am
Location: Gateshead United Kingdom

Post by paulz49 »

Thanks for your reply feyd
Just tried your suggestion - Apache won't start if I take away the # from the Load module line I keyed in - error message 'request operation failed' but once I add the # back to the line of code - Apache web server will restart.
Still get page cannot be found 404 error after restarting apache and typing in http://localhost/phpinfo.php into web browser.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it's possible your php4apache2.dll isn't in c:/php/ but c:/php/sapi/

at least, that's where mine are.
paulz49
Forum Newbie
Posts: 4
Joined: Wed Jan 19, 2005 7:32 am
Location: Gateshead United Kingdom

Post by paulz49 »

Thanks once again for your advice feyd
my php4apache2.dll file sits in
C:\php-4.3.3-Win32\sapi
I have tried -
#LoadModule php4_module c:/php-4.3.3-Win32/sapi/php4apache2.dll
but still get page cannot be found when entering http://localhost/phpinfo.php in my web browser
If I try the LoadModule line without the # - my apache web server will not run when I try to restart it after the code change in the httpd conf file.
I have a copy of the php.ini file in c:\windows\ and a copy of
php4ts.dll file in c:\windows\system

Think I might just uninstall/install everything and start again before my PC goes out of the window :)))
Post Reply