Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    Member
    Join Date
    Jun 2006
    Posts
    6

    Unhappy Unusual phpsuexec Problem

    On certain scripts I get a internal server error when phpsuexec is installed (they all work fine without it). When I check the error log for these scripts all I see is "Premature end of script headers". I have checked suexec_log as well and there is nothing unusual. The one script (Filebrowsers thumbnailer) only causes an internal server error when thumbnailing large images (over 2 MB) and with the other script (Drupals module page under administer) I only get this error when I upload more than 1 extra module. These are the only scripts I have found any problems with so far. I have tried replacing/reinstalling them several times and they all have the correct permissions. What else should I check and how do I fix this? I am completely baffled.

  2. #2
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    Quote Originally Posted by x86eon
    The one script (Filebrowsers thumbnailer) only causes an internal server error when thumbnailing large images (over 2 MB)
    As for this, it might be due to memory issues. Admittedly if a PHP script runs out of memory, it will generally give an 'out of memory' error, but you never know.

    Opening images, particularly compress formats such as jpegs, takes a fair amount of RAM - a jpeg with a 2MB filesize could easily require up to 16MB of RAM.

    You might want to check the error_log file created in the directory from which the script runs to see if any further details are mentioned.

  3. #3
    Member
    Join Date
    Jun 2006
    Posts
    6

    Default

    I increased the memory limit in php.ini from 8M to 32M and I am still getting an internal server error with Filebrowser. For some reason these errors are not causing an error_log to be generated in same directory as the script.

  4. #4
    Member
    Join Date
    Aug 2005
    Posts
    131

    Default

    login to ssh and run

    chown username:username /home/username/public_html/* -R
    chmod 755 /home/username/public_html/* -R

    then try again. remember to replace username with the accounts actual username

  5. #5
    Member
    Join Date
    Aug 2002
    Posts
    1,120

    Default

    Quote Originally Posted by oulzac
    chown username:username /home/username/public_html/* -R
    chmod 755 /home/username/public_html/* -R
    The first one makes sense, but I'm not sure if you want to set the permission on everything under the public_html to 755. The directories maybe, but not the files. I'm not sure if PHP scripts will execute with phpsuexec if they are above 644. You might try:

    chown -R username:username /home/username/public_html
    find /home/username/public_html -type d -exec chmod 755 {} \;


    This will change the ownership of all files and directories under the public_html directory to the account's username. The next command will find all directories under the public_html directory and set the permissions on those directories to 755, which should be correct for phpsuexec.

  6. #6
    Member
    Join Date
    Jun 2006
    Posts
    6

    Default

    I ran those commands but the problems are still there. All the scripts run okay except when I try to do the things mentioned above, so I don't think it's an ownership problem. Any other ideas?

  7. #7
    Member Solokron's Avatar
    Join Date
    Aug 2003
    Posts
    783

    Default

    Did you ever resolve this?

    Quote Originally Posted by x86eon
    I ran those commands but the problems are still there. All the scripts run okay except when I try to do the things mentioned above, so I don't think it's an ownership problem. Any other ideas?

  8. #8
    Member
    Join Date
    Jun 2006
    Posts
    6

    Default

    Nope. I have asked others as well and they too have found the problem mystifying. cPanel support is blamed it on the scripts themselves but I know this not to be the case as it affects every script used. The scripts we are using also worked fine under a similar cPanel enviroment with phpsuexec.

  9. #9
    Member
    Join Date
    Aug 2005
    Posts
    131

    Default

    this issue is just with the public_html folders

    do this:
    chown username:username /home/username/public_html
    chmod 755 /home/username/public_html

    *do not do it recursive, just the public_html folders

  10. #10
    Member Solokron's Avatar
    Join Date
    Aug 2003
    Posts
    783

    Default

    This does not apply. Clients have been in a php suexec environment with 4.4.2 previously and worked fine.

    Quote Originally Posted by oulzac
    this issue is just with the public_html folders

    do this:
    chown username:username /home/username/public_html
    chmod 755 /home/username/public_html

    *do not do it recursive, just the public_html folders

  11. #11
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    Quote Originally Posted by Solokron
    This does not apply. Clients have been in a php suexec environment with 4.4.2 previously and worked fine.
    Try the solution I gave you in one of your threads.
    Andy Reed
    RHCE and CCNA
    ServerTune.com

Similar Threads & Tags
Similar threads

  1. PHPSuexec Problem
    By webdave in forum cPanel and WHM Discussions
    Replies: 12
    Last Post: 01-24-2007, 10:02 AM
  2. php cannot send mail - unusual problem - urgent
    By shx in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 10-25-2006, 11:50 AM
  3. Unusual problem with MySql
    By Guigows in forum cPanel and WHM Discussions
    Replies: 14
    Last Post: 08-02-2006, 08:35 PM
  4. PHPSuexec Problem
    By MN-Robert in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 07-27-2003, 04:13 PM
  5. Very Unusual Problem
    By v2webltd in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-23-2002, 05:32 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube