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 support...500 error

Discussion in 'General Discussion' started by I Love Jesus, Dec 15, 2004.

  1. I Love Jesus

    I Love Jesus AKA chadi

    Joined:
    Dec 6, 2004
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    In the past I have enabled phpsuexec support in WHM's Updata Apache (please clarify that this is the SAME thing as when people refer to phpsuexec itself and not someother special "support" version of phpsuexec). I've gotten the typcial 500 error message.

    How do I go around this 500 error?

    What should the others on the server do to prevent the 500 error as well? Is there a way to enable phpsuexec support and do something serverwide to correct the 500?

    Specs:
    cPanel 9.9.9. R-14
    Fedora Core 1, 2 and CentOS (different servers for testing on some)

    Thanks in advance for your help
     
  2. sleddog

    sleddog Active Member

    Joined:
    Jun 13, 2004
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Labrador, Canada
    Check file ownership and permissions. Files should be owned by the user and typically chmodded 644.
     
  3. paradoxic

    paradoxic Member
    PartnerNOC

    Joined:
    Jun 13, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    First things to check are file permissions (perl scripts must be 755). make sure the owner and groups are proper for what scriptalias is calling out in httpd.conf. Also make sure that httpd.conf has all the proper Addhandler stuff IE:

    AddHandler cgi-script .cgi .pl


    From there, check the /usr/local/apache/logs/suexec_log suexec log and see what errors are arising.


    That being said, I have an extreme stumper of a problem with my suexec on freebsd 5.3.... No scripts within the cgi-bin are working. I've tried everything i know of to get this fixed.

    No errors come up inside suexec_log but the page comes up 500. Here is the snip:

    [2004-12-15 09:12:55]: info: (target/actual) uid: (example/example) gid: (example/example) cmd: test.cgi


    I am loosing my sanity trying to figure out what is wrong here. I've tried running anything related from /scripts/ that seemed related to no avail.

    I have also tried reinstalling perl etc.

    Can anyone give me some sort of guiding light here? Cpanel refuses to help because it is freebsd 5.3 :(
     
  4. I Love Jesus

    I Love Jesus AKA chadi

    Joined:
    Dec 6, 2004
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    I understand file permissions, but I don't know about handlers and group/owner information? Where is that?

    I'm new so please explain
     
  5. paradoxic

    paradoxic Member
    PartnerNOC

    Joined:
    Jun 13, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Chmod 644 will not work with phpsuexec, it needs to be chmod 755 or it will give an error.
     
  6. paradoxic

    paradoxic Member
    PartnerNOC

    Joined:
    Jun 13, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    look inside httpd.conf, the apache configuration file.


    To check the group/user permissions go into the directory of the perl script and type:
    ls -l

    it will show the user and group.

    Foremost you should check the suexec log and see what error is being reported. This will give you an idea of what is going on.

    tail -f /usr/local/apache/logs/suexec_log

    Paste what the last lines are there in this thread and we can help more.
     
    #6 paradoxic, Dec 15, 2004
    Last edited: Dec 15, 2004
  7. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    Other than moving php directives that might be in .htaccess to a php.ini under the users directory, set up a cron to run /scripts/fixsuexeccgiscripts every 20 or so which will scan the logs and change permissions appropriatly. You might also need to run /scripts/enablefileprotect every so often to help clear up the issue.
     
  8. sleddog

    sleddog Active Member

    Joined:
    Jun 13, 2004
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Labrador, Canada
    You'd better tell that to my webserver :)

    Why should a PHP file accessed by apache be executable? Running pspsuexec, the file needs only to be readable by the user. In fact chmod 600 works fine -- for me anyway.
     
  9. paradoxic

    paradoxic Member
    PartnerNOC

    Joined:
    Jun 13, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Oops, I was thinking about suexec, not phpsuexec. I appologise.
     
  10. dezignguy

    dezignguy Well-Known Member

    Joined:
    Sep 26, 2004
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    16
    Paradoxic... that's the command to create a symbolic link... you want the 'ls' command for a file listing. Specifically, the command:

    ls -al

    is what I use to show most of the file data, including hsowing hidden files.
     
Loading...

Share This Page