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.

phpsuexec returns 500 error

Discussion in 'General Discussion' started by Xenon101, Nov 2, 2005.

  1. Xenon101

    Xenon101 Well-Known Member

    Joined:
    Mar 13, 2005
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    I've just installed cPanel on a fresh CentOS 4.2 server, it's a p4 3.0ghz with 512mb ram & 300gb sata hdd. It's on 10mbit line.

    I've got apache working ok but just rebuilt with phpsuexec and php 4.3.11 but all i get is 500 errors with phpbb & phpinfo file.

    Php info file is just normal
    PHP:
    <?php
    phpinfo
    ();
    ?>
    but it says "imature script headers" and error 500.

    Any ideas??

    Regards,
    Iain Shortreed
     
  2. jackie46

    jackie46 BANNED

    Joined:
    Jul 25, 2005
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    0
    rm -f /tmp/sess*
    /etc/init.d/httpd restart
     
  3. Xenon101

    Xenon101 Well-Known Member

    Joined:
    Mar 13, 2005
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Gave that a try just now but still having this error :/
     
  4. IberHosting

    IberHosting Well-Known Member

    Joined:
    Jun 1, 2005
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    Run in WHM: fix insecure permissions, or chmod the files to 755
     
  5. Xenon101

    Xenon101 Well-Known Member

    Joined:
    Mar 13, 2005
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    No joy, still stuck with that error. Have run that in whm many times already and have tried chmoding, chowning.

    Edit: Looked through suexec_log and found lots of errors but i have no idea what they mean. Any ideas?

    take a look at my suexec log
     
    #5 Xenon101, Nov 3, 2005
    Last edited: Nov 3, 2005
  6. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    I'm getting a timeout trying to access that file. Can you post the errors from suexec_log in this thread?

    As for getting PHP scripts to work with phpsuexec enabled:

    1) Ensure that the permissions do not exceed 0755. Unless otherwise needed, my PHP scripts run happily with 0644 permissions. Same applies to the directory the script is in, apart from public_html which should have 0750 permissions (at least for me).

    2) Ensure that the ownership is relevantuser:relevantuser and not nobody:nobody. Ditto for the directory, apart from public_html which should always be owned by 'relevantuser' and belong to the group 'nobody'.

    3) Ensure that scripts are uploaded in ASCII and not BINARY mode when ftping. If in doubt, delete and reupload - this one generally gets you a 'premature end of headers' type error.

    Check the above three points and then check them again. If you're still encountering script execution errors, post back the relevant lines only from your suexec_log AND check the above three points again.
     
  7. Xenon101

    Xenon101 Well-Known Member

    Joined:
    Mar 13, 2005
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    phpsuexec log:
    Code:
    [2005-11-02 22:32:13]: info: (target/actual) uid: (iain/iain) gid: (iain/iain) cmd: phpinfo.php
    [2005-11-02 22:32:13]: error: target uid/gid (32003/32003) mismatch with directory (32003/99) or program (0/0) or trusted user (0/10)
    That's just repeated a few times.

    Edit: Fixed with a chown iain:nobody on pub html & iain:iain on php file :) cheers!
     
    #7 Xenon101, Nov 3, 2005
    Last edited: Nov 3, 2005
  8. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Good to hear that the problem is sorted out, and that the 3 magic phpsuexec rules still work!
     
Loading...

Share This Page