elduderino Posted February 14, 2008 Share Posted February 14, 2008 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? Quote Link to comment https://forums.phpfreaks.com/topic/91117-why-do-my-php-files-get-offered-for-download-instead-of-being-parsed/ Share on other sites More sharing options...
powerspike Posted February 15, 2008 Share Posted February 15, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/91117-why-do-my-php-files-get-offered-for-download-instead-of-being-parsed/#findComment-467374 Share on other sites More sharing options...
elduderino Posted February 15, 2008 Author Share Posted February 15, 2008 hi there...no, i i said in my post that i'd added the AddType declaration for php into apache configuration...its something else Quote Link to comment https://forums.phpfreaks.com/topic/91117-why-do-my-php-files-get-offered-for-download-instead-of-being-parsed/#findComment-467531 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.