How to fix application/x-httpd-php – Trouble in getting php to parse
Do you ever faced the problem in opening your website? What if your server have trouble in parsing the php files? What if you open your blog and your browser ask to download a php file instead of opening the page? You may arrest into illusionist array of problem whenever your server messed up or have any critical troubles.
Php parsing is a common problem that is occurred due to misconfiguration in the server side, can be resists by accurate .htaccess rules. In case you are still confused on what we are going to discuss then have a look over this screenshot.(as a result of configured server files )
How to resolve this issue when .php wouldn’t execute by your server?
- Open your .htaccess file and take its backup
- Delete the old .htaccess file
- Create a new .htaccess file with CHMOD = 777 and upload the new file in ascii mode.
- Add the following handler in the blank .htaccess
AddType application/x-httpd-php .php .htm .html AddHandler x-httpd-php .php .htm .html
Alternative Way: You cal also try to add following code in the blank .htaccess
AddType application/x-httpd-php php html
After creating the new .htaccess file try to open your site, it will work perfectly fine. Note: In case you still have any issues with the server then feel free to comment here. If your hosting support is quick enough like that of Hostgator then you may contact your support team, they will easily resolve your issues.
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
January 19th, 2010 at 4:22 pm
RT @honeytech How to fix application/x-httpd-php – Trouble in getting php to parse http://bit.ly/99PCN
February 24th, 2010 at 9:41 pm
Hi,
I did what you said and unfortunately it didn’t fix the problem.
Any idea why?
-Guy
February 24th, 2010 at 11:57 pm
@Guy Droog
Have you deleted the old .htaccess file and new .htaccess is 777 ?
April 23rd, 2010 at 3:44 pm
Thank you. It is very usefull!
April 23rd, 2010 at 6:16 pm
@Spas
Welcome, hope you fixed the application/x-httpd-php issues !
May 19th, 2010 at 3:05 am
You instructions make your Apache configuration file world WRITABLE. No sane web developer or system administrator should do this. Please consider chmod 666 instead!
May 19th, 2010 at 3:10 am
Doh! I meant to write:
chmod 755
Which gives the owner full privileges (read, write, execute) but only read/execute for the group & world.
May 22nd, 2010 at 8:16 am
666 is still world writable. 755 is also unnecessary, since this file is not executable. A more sensible choice would be 644.
June 22nd, 2010 at 10:07 am
Thanks for posting your valuble suggestions here,by using this
article i solved the problem,thanks a lot.Please keep posting.
I am more interested to get the posts from this site articles directly to my mail id ,is there any chance to get like this.
My Email id : maheswarreddy.n@gmail.com
December 22nd, 2010 at 9:38 pm
it helps a lot! I have solve my issues with your suggestitions
January 7th, 2011 at 3:05 am
Please. Help me
Where is the file .htaccess? I don’t find it
What is the path?
My server is Ubuntu 10.04
July 13th, 2011 at 9:58 am
Restart apache2 and this FIx the problem