Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: cant seem to get PHP to run on apache 2.2 |
|
Author |
|
sjhancox
Joined: 19 Jul 2008 Posts: 2
|
Posted: Sat 19 Jul '08 19:29 Post subject: cant seem to get PHP to run on apache 2.2 |
|
|
Hi,
I am new to all of this and can't seem to get PHP to run on Apache. I have installed Apache but cannot get it to respond to http://localhost. This may be because I cannot get the Apache service to start unless I configure the Apache server to start with either a different IP address or Port number - i.e. I currently have it configured to listen on port 82.
If I run http://localhost i get the ususal webpage cannot be found message.
If i then try http://localhost:82 i get the "it works!" page.
From this I assume that Apache is up and running. I have been following a guide to try and get PHP running on it aswell and so far have followed all of the config suggested by adding the following lines to httpd.conf:
LoadModule php5_module c:/php/php5apache2_2.dll
PHPIniDir "C:/php/"
and
AddType application/x-httpd-php .php .html
The guide then suggests to make a php file called phpinfo.php which contains the following:
<?php
phpinfo();
?>
and save it in the htdocs directory.
It then says to go to http://localhost/phpinfo.php this should then give me details of the php install. If I do this i get the webpage cannot be displayed page as before. If I also try http://localhost:82/phpinfo.php i also get the webpage cannot be found message.
Has anyone got any ideas if I've missed something or doing something wrong? As I said I am new to this and don't really know what I am looking for to fix it as yet.
I am running Win XP home SP3 with no firewall apps running at all.
Any help would be greatully appreciated.
Simon |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
|
Back to top |
|
sjhancox
Joined: 19 Jul 2008 Posts: 2
|
Posted: Sat 19 Jul '08 19:43 Post subject: |
|
|
James Blond,
Thanks for that - my php file was called phpinfo.php.txt. DOH!!!!
Removed the txt and all working now.
Thanks
Simon |
|
Back to top |
|
|
|
|
|
|