Jump to content

[SOLVED] apache will not read php files


evanct

Recommended Posts

This is Windows Vista. I just installed PHP5 and Apache 2, and apache will not read PHP files. html files work perfectly - when i go to localhost, i get the 'it works!' message - but if I write a hello world script or something, all i'm shown is the text of the script itself. what could be wrong?

 

Oh and this occurs regardless of which browser I use.

Link to comment
Share on other sites

Nevermind. i had to add

 

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
LoadModule php5_module "c:/php/php5apache2_2.dll"
SetEnv PHPRC C:/php 

 

to the bottom of httpd.conf and then restart apache.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.