Jump to content

why do my php files get offered for download instead of being parsed??


elduderino

Recommended Posts

Hi,

 

I've been having this problem on a new server where when i try to run a php script in my browser it gives me a download prompt instead of the file....i called support and they resolved it but i didnt get to find out the problem.

 

Now i've created a sub-domain and it's happening again.....i didn't create the sub-domain the usual way in httpd.conf, with a virtual host block, because my server runs plesk which overrides the httpd.conf file.....i have another file called vhosts.conf in the same directory as my sub-domain content from which i can control apache....so i added the AddType application/x-httpd-php .php into this but the problem still occurs...

 

any ideas?

Ok, when you setup php on apache, you need to add in both "AddType" and "AddHandler" you'll find that AddType  is missing, once you add it, and restart apache, it should all work fine.

AddType application/x-httpd-php .php .phtml

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.