Portal Home > Knowledgebase > Articles Database > internal server error after enabling phpsuexec
internal server error after enabling phpsuexec
Posted by b3nz, 06-21-2007, 07:38 PM |
Title says it all
|
Posted by No1Resource, 06-21-2007, 09:40 PM |
Do you have .htaccess rules attempting to override PHP? Check your server's error_log to see what the error consists of.
|
Posted by sprintserve, 06-22-2007, 06:18 AM |
Common errors:
1. Check the permissions of the scripts. 777 will cause an error 500. Change it to 755 max or lower if you want it to be secure.
2. Check the ownership of the scripts. Make sure it's own by the account owner.
3. Check .htaccess for anything that tries to modify PHP such as php_admin_value, php_flag, php_value etc. If they exist, comment them out. Also an issue is attempting to force the type to PHP for non standard extensions. For those you can change it to handlers.
|
Posted by Russ Foster, 06-22-2007, 07:00 AM |
Run tail -f /etc/httpd/logs/error_log whilst accessing the page and tell us what the error says
|
Posted by LP560, 06-22-2007, 07:14 AM |
Which version of PHP are you using?
|
Posted by tracphil, 06-22-2007, 07:23 AM |
chmod your directories to 755 and your .php files to 644. Just remember that you will never need to have a file or directory world writable... php will refuse to write to it.
You will also need to convert your .htaccess php flags to your php.ini, such as:
.htaccess » php_flag register_globals on
php.ini » register_globals=on
and as other said... be sure to view your log files.
|
Posted by Mxhub, 06-22-2007, 07:54 AM |
tracy tell it all.. just make sure php file are set to 755
and php configuration in .htaccess are modify accordingly as describe by tracy.
|
Posted by b3nz, 06-22-2007, 05:51 PM |
All Directories has been set to 711 (rwx--x--x) and All files to 644, all files owned by the account owner
It seems that the problem just exists with php5, I downgraded to php4 and the problem was solved
here's a part of the log result :
------------------------------------------
[Fri Jun 22 14:10:07 2007] [error] [client 74.6.74.93] File does not exist: /hosting/ariacom/public_html/404.shtml
[Fri Jun 22 14:10:07 2007] [error] [client 74.6.21.24] Premature end of script headers: /hosting/ariacom/public_html/forum/showthread.php
[Fri Jun 22 14:10:07 2007] [error] [client 74.6.21.24] File does not exist: /hosting/ariacom/public_html/500.shtml
[Fri Jun 22 14:13:53 2007] [error] [client 217.218.210.4] malformed header from script. Bad header=\x1f\x8b\b: /hosting/aforums/public_html/forum/index.php
[Fri Jun 22 14:13:53 2007] [error] [client 217.218.210.4] File does not exist: /hosting/aforums/public_html/500.shtml
------------------------------------------
I had set register_globals off because of php scripts vulnerabilities such as remote file inclusion and ... , I set this option on but the problem still exists
any idea ?
Thanks all in advance
Last edited by b3nz; 06-22-2007 at 05:55 PM.
|
Posted by tracphil, 06-22-2007, 05:55 PM |
I think I would set the directories at 755.
What script are you trying to get to work and maybe that will help us help you troubleshoot it better.
|
Posted by LP560, 06-22-2007, 05:56 PM |
I had the same problem, I was running PHP 5.2, downgraded to 5.1 and it worked fine.
|
Posted by b3nz, 06-22-2007, 06:03 PM |
This problem exits for all users and all php scripts
I tested setting the directories at 755 but nothing seems to be changed
|
Posted by b3nz, 06-22-2007, 06:07 PM |
So you think this problem should be solved by php developing team ?
|
Posted by carolinahosting, 06-23-2007, 06:07 PM |
I ran phpsuexec in the past with apache 1.x, how does it work with the new apache 2 with cpanel 11 ?
|
Posted by tracphil, 06-23-2007, 06:13 PM |
carolinahosting,
I run cPanel 11 and its pretty nice. Stable and Release still use apache 1.x. I think edge still uses 1.x as well... I think until they get the issues worked out with easyapache3, 1.x is it. I personally do not keep track of Edge much... its to bleedign edge for me and I don't like to bleed
http://www.cpanel.net/products/cPane...l11/index.html
That gives the release schedule for the release stages. Apache 2.x should be in Release two starting with Edge.
|
Posted by carolinahosting, 06-23-2007, 06:42 PM |
HV | Tracy,
thanks for the info!
|
Posted by sirius, 06-23-2007, 08:34 PM |
Moved to Technical and Security Issues...
Sirius
|
Posted by batulang, 07-27-2007, 07:45 AM |
Hi everybody,
I also face this kind of error all the time. After looking for some advie, i have some question
chmod folder to 755 and file to 644, and make sure all the file and folder owner is "Account name" but how can I chmod, when using ftp software to chmod, it couldn't work, it show error message like i don't have permission or what.
How can I change account owner name?
Anyone can help? thanks in advance.
|
Posted by carolinahosting, 07-27-2007, 08:31 AM |
1. what does /etc/httpd/logs/suexec log state when you get the 500 error?
2. I have discovered you will get a 500 error with the latest version of php 5 and suexec, try 4.7 or one or two revs down on php 5.
3. php files must be no greater then 755, same is true for directories hosting php files.
4. php files must have proper ownership, NOT nobody.nobody or NOT root.root but the actual correct user.group
5. Remove any part of php from your .htaccess file.
|
Posted by carolinahosting, 07-27-2007, 08:32 AM |
we assume you have ssh access. If you are not root, your host needs to help PD this.
|
Posted by Patrick, 07-27-2007, 08:43 AM |
First question:
If your FTP client is giving you a permission denied error when trying to change the chmod, you will have to login via SSH and do it that way first.
Second question:
To change the ownership of a file or directory, it would be done via SSH using chown user:user
If you upload any files via FTP, they will automatically become user:user or user:nobody... so you should only have to change the files that were on the server before you switched to phpsuexec.
|
Add to Favourites Print this Article
Also Read
Fstab corrupt (Views: 635)