suPHP Causes 500 Error on info.php files

drewrowland

Member
Oct 19, 2013
10
0
1
cPanel Access Level
Root Administrator
I am using suPHP as my handler, however when I create a file with:

PHP:
<?php phpinfo(); ?>
I always get a 500 error. If I use FCGI it works fine, however i'd prefer to use suPHP. Any ideas?
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
Do you create that file as root?
If so, do you change the owner of the file?

Also you could check Apache's error log:
/usr/local/apache/logs/error_log
to see the actual error.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

It's always a good idea to check the Apache error log (/usr/local/apache/logs/error_log) when you receive a "500" error message on your website. It's likely the file is not owned by the account username, or is not using 0644 permissions.

Thank you.
 

drewrowland

Member
Oct 19, 2013
10
0
1
cPanel Access Level
Root Administrator
Hello :)

It's always a good idea to check the Apache error log (/usr/local/apache/logs/error_log) when you receive a "500" error message on your website. It's likely the file is not owned by the account username, or is not using 0644 permissions.

Thank you.
This is what I am getting:
Code:
[Tue Oct 22 16:04:16 2013] [notice] Graceful restart requested, doing restart
[Tue Oct 22 16:04:16 2013] [notice] Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 configured -- resuming normal operations
[Tue Oct 22 16:06:23 2013] [error] [client 174.70.101.172] SoftException in Application.cpp:357: UID of script "/home/puresimp/public_html/info.php" is smaller than min_uid
[Tue Oct 22 16:06:23 2013] [error] [client 174.70.101.172] Premature end of script headers: info.php
[Tue Oct 22 16:06:23 2013] [error] [client 174.70.101.172] File does not exist: /home/puresimp/public_html/500.shtml
[Tue Oct 22 16:06:27 2013] [error] [client 174.70.101.172] SoftException in Application.cpp:357: UID of script "/home/puresimp/public_html/info.php" is smaller than min_uid
[Tue Oct 22 16:06:27 2013] [error] [client 174.70.101.172] Premature end of script headers: info.php
[Tue Oct 22 16:06:27 2013] [error] [client 174.70.101.172] File does not exist: /home/puresimp/public_html/500.shtml
 

drewrowland

Member
Oct 19, 2013
10
0
1
cPanel Access Level
Root Administrator
So I ran this:

Code:
chown puresimp:puresimp -R /home/puresimp/public_html
now i'm getting a 403 instead of a 500. Checked permissions and that seems to be okay.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
Just chmod to 755 instead of 750 and it works.
chmod what?


This:
[Tue Oct 22 16:06:27 2013] [error] [client 174.70.101.172] SoftException in Application.cpp:357: UID of script "/home/puresimp/public_html/info.php" is smaller than min_uid
tells that info.php was owned by root.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
So I ran this:

Code:
chown puresimp:puresimp -R /home/puresimp/public_html
now i'm getting a 403 instead of a 500. Checked permissions and that seems to be okay.
It's not a good idea to recursively change ownership on all files in the public_html directory. You should have simply adjusted ownership on the individual file. You will likely need to correct ownership of the public_html directory to:

user:nobody

Thank you.