I Love Jesus

AKA chadi
Dec 6, 2004
62
0
156
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
 

paradoxic

Member
PartnerNOC
Jun 13, 2004
22
0
151
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 :(
 

I Love Jesus

AKA chadi
Dec 6, 2004
62
0
156
I understand file permissions, but I don't know about handlers and group/owner information? Where is that?

I'm new so please explain
 

paradoxic

Member
PartnerNOC
Jun 13, 2004
22
0
151
sleddog said:
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.
 

paradoxic

Member
PartnerNOC
Jun 13, 2004
22
0
151
I Love Jesus said:
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:

haze

Well-Known Member
Dec 21, 2001
1,550
3
318
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.
 

sleddog

Active Member
Jun 13, 2004
44
0
156
Labrador, Canada
paradoxic said:
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.
 

paradoxic

Member
PartnerNOC
Jun 13, 2004
22
0
151
sleddog said:
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.
 

dezignguy

Well-Known Member
Sep 26, 2004
533
0
166
paradoxic said:
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.