The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Enable SUPHP Issues...

Discussion in 'General Discussion' started by dkz, Nov 24, 2007.

  1. dkz

    dkz Well-Known Member

    Joined:
    Sep 10, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

    I need to have the php files on my server run as the user instead of nobody so I tried to enable suphp. Once I recompile Apache and enable suphp, no php scripts work (500 error). I belive the correct options are checked to run php as cgi. The error is "Premature end of script headers". I've read some previous posts on this exact problem however I have not yet been able to get it to work. The server is OS is CentOS 5 running the release version of cpanel usine Apache 2.2 and PHP 5.2.5.

    Any suggestion will be greatly appreciated!
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I think checking chmod on files might be what you seek.
     
  3. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    When Apache is compiled with SuPhp security feature you can't send php commands via the .htaccess file. Go to: http://www.suphp.org/FAQ.html and read their FAQ and browse their site for more information about other SuPhp issues. You also need to read this HowTo article at: http://servertune.com/kbase/?View=entry&EntryID=184

    Hope this helps
     
  4. dkz

    dkz Well-Known Member

    Joined:
    Sep 10, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for the suggestions!

    I've tried using chmod before but since it is a different owner, it gives me an error.
    It's not a .htaccess problem either. I will review the suPHP faq but I was hoping someone knew a quick fix for this problem.

    Thanks.
     
  5. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    As said above, the cause of this in 99% of cases is either:

    • the file permissions allow write to group or other, or the directory they are in has write permission to group or other;
    • or, the file is owned by someone other than the account the file is in;
    • or, there is a php_* directive in the .htaccess file. They have to be moved into a php.ini file.


    I'd triple check each of these just to be sure.
     
Loading...

Share This Page