Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    AKA chadi
    Join Date
    Dec 2004
    Posts
    62

    Default phpsuexec support...500 error

    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. #2
    Member sleddog's Avatar
    Join Date
    Jun 2004
    Location
    Labrador, Canada
    Posts
    44

    Default

    Check file ownership and permissions. Files should be owned by the user and typically chmodded 644.

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jun 2004
    Posts
    22

    Default

    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. #4
    AKA chadi
    Join Date
    Dec 2004
    Posts
    62

    Default

    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. #5
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jun 2004
    Posts
    22

    Default

    Quote Originally Posted by sleddog
    Check file ownership and permissions. Files should be owned by the user and typically chmodded 644.
    Chmod 644 will not work with phpsuexec, it needs to be chmod 755 or it will give an error.

  6. #6
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jun 2004
    Posts
    22

    Default

    Quote Originally Posted by I Love Jesus
    I understand file permissions, but I don't know about handlers and group/owner information? Where is that?

    I'm new so please explain
    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.
    Last edited by paradoxic; 12-15-2004 at 07:59 PM.

  7. #7
    Member
    Join Date
    Dec 2001
    Posts
    1,558

    Default

    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.
    Beau Henderson

  8. #8
    Member sleddog's Avatar
    Join Date
    Jun 2004
    Location
    Labrador, Canada
    Posts
    44

    Default

    Quote Originally Posted by paradoxic
    Chmod 644 will not work with phpsuexec, it needs to be chmod 755 or it will give an error.
    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. #9
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jun 2004
    Posts
    22

    Default

    Quote Originally Posted by sleddog
    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.
    Oops, I was thinking about suexec, not phpsuexec. I appologise.

  10. #10
    Member
    Join Date
    Sep 2004
    Posts
    529

    Default

    Quote Originally Posted by paradoxic
    To check the group/user permissions go into the directory of the perl script and type:

    ln -s

    it will show the user and group.
    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.

Similar Threads & Tags
Similar threads

  1. phpsuEXEC - causes 500 errors on some sites
    By trigger hippy in forum cPanel and WHM Discussions
    Replies: 18
    Last Post: 08-25-2006, 12:47 PM
  2. phpsuexec support 500
    By Secret Agent in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-24-2006, 09:39 AM
  3. phpsuexec support
    By Secret Agent in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-17-2006, 12:10 AM
  4. phpsuexec returns 500 error
    By Xenon101 in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 11-03-2005, 09:59 AM
  5. If Perl produces a 500 server error would phpsuexec as well?
    By jackie46 in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 10-16-2005, 01:17 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube