logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: cant seem to get PHP to run on apache 2.2
Author
sjhancox



Joined: 19 Jul 2008
Posts: 2

PostPosted: Sat 19 Jul '08 19:29    Post subject: cant seem to get PHP to run on apache 2.2 Reply with quote

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

PostPosted: Sat 19 Jul '08 19:33    Post subject: Reply with quote

Please read Basic PHP Troubleshooting

if you stil have a question post again.
Back to top
sjhancox



Joined: 19 Jul 2008
Posts: 2

PostPosted: Sat 19 Jul '08 19:43    Post subject: Reply with quote

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


Reply to topic   Topic: cant seem to get PHP to run on apache 2.2 View previous topic :: View next topic
Post new topic   Forum Index -> Apache