Access forbidden for php files in browser... html files work just fine

Discussion in 'Server Operation' started by krissie, Jun 30, 2010.

  1. krissie

    krissie New Member

    I'm about to finish the server install from hell (my first serious linux server), and I come to upgrading PHP to v5.2.13. Before I upgraded, I created a phpinfo file with wide open permissions... I tried to open it from my browser, and I get "access denied"... nothing more and nothing less. just those two words.

    I assumed it might be fixed, whatever it was, from the upgrade, so I pressed ahead and upgraded... still "access denied". I created a html file with a small php include in it... I could show that in my browser, but no output from the php... in fact, the browser showed the PHP itself. I set a php mimetype in the htaccess file, and it was no help.

    I checked the apache logs - no hint that I could see.

    I'm not really sure where to go from here - where to look and what to do!?!?

    Any help would be sincerely appreciated.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The permissions of a php file should be 755. Using 777 might cause a permission error as apache might treat this as insecure. Also make sure that the php file is owned by the user and group of the website and that you uploaded it into the "web" directory of the website.
     
    Last edited: Jun 30, 2010
  3. krissie

    krissie New Member

    Absolutely right on the money.... perfect. It works.

    Thank you ever so much!

    xx
     

Share This Page