Forum Moderators: phranque

Message Too Old, No Replies

Apache not serving php pages

         

Pico_Train

8:59 pm on Apr 20, 2007 (gmt 0)

10+ Year Member



I just installed apache 2.0.59 for windows on my computer. Apache seems to be running fine, I can restart, stop and start the server - no problem.

If I go to the site site.localhost, it lists the page in the folder, only 1 page in there - index.php. The problem seems to be with serving files properly. I have created a virtual host and the htpd.conf file seems fine but everytime I try to go site.localhost/index.php with the following code in it:

<?php echo phpinfo() ;?>

it prompts me to open, save or cancel the file in the little Windows download type pop-up box.

Anybody have any clues or ideas to what I might be doing wrong with this new install?

Thanks!

londrum

9:14 pm on Apr 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



that's what happens when it doesn't understand what to do with a file - it prompts you to download it instead.

that either means that you haven't yet installed php (which i assume you have!), or you still need to amend a few settings in the conf file.

there's quite of lot of things to go through, so i won't write it out. but there's a nice easy tutorial on thesitewizard site. just do a search for "install php"

jdMorgan

11:29 pm on Apr 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is a handler and/or MIME-type problem.

Look in the WebmasterWorld php forum library. There are several tutorials there. Or search WebmasterWorld for even more.

Jim

Pico_Train

6:32 am on Apr 21, 2007 (gmt 0)

10+ Year Member



Fixed hehe! Forgot this part:

# For PHP 5 do something like this:
LoadModule php5_module "c:/php5/php5apache2.dll"
AddType application/x-httpd-php .php .php3 .phps

# configure the path to php.ini
PHPIniDir "C:/php5"

Thanks guys for your help.