Results 1 to 16 of 16
Thread: phpsuexec
-
05-31-2005, 04:45 PM #1Taking a break from hosting
- Join Date
- Mar 2003
- Location
- Charlotte, NC
- Posts
- 2,761
phpsuexec
When I install phpsuexec, most scripts give an internal server error. I believe it's because scripts are either CHMODed incorrectly or owned by "nobody". Is there any CPanel script to run in order to fix the permissions? I know there's something like this for CGI scripts and suexec.
Thanks!
-
05-31-2005, 05:56 PM #2Web Hosting Master
- Join Date
- Jul 2003
- Location
- Nothing but, net
- Posts
- 2,064
/scripts/fixsuexeccgiscripts
If you're changing from mod_php to phpsuexec it is a good idea to just cron that fix script to run every 5 minutes for the first couple of days.
-
05-31-2005, 06:00 PM #3Been around for too long...
- Join Date
- Aug 2002
- Location
- DC
- Posts
- 3,643
That didn't work - I visited a php script that brought up an error, ran /scripts/fixsuexeccgiscripts, but it didn't do anything. The errors are showing up the the suexec error log though, so the script should be working. I can't figure out why it didn't work, Josh couldn't figure it out either. Any other ideas?
- Matt
-
05-31-2005, 06:37 PM #4Problem Solver
- Join Date
- Mar 2003
- Location
- California USA
- Posts
- 13,681
do you have any .htaccess files? php_admin functions cannot be there
Steven Ciaburri | Industry's Best Server Management - Rack911.com
Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance
-
05-31-2005, 06:49 PM #5Web Hosting Master
- Join Date
- Apr 2000
- Location
- California
- Posts
- 3,051
Originally posted by mainarea
That didn't work - I visited a php script that brought up an error, ran /scripts/fixsuexeccgiscripts, but it didn't do anything. The errors are showing up the the suexec error log though, so the script should be working. I can't figure out why it didn't work, Josh couldn't figure it out either. Any other ideas?
- Matt
There are probably a dozen reasons why this could be erroring. Be sure that the User/Group directives are in their virtualhost block in the Apache configuration file. Be sure that you don't have "web root protection" enabled when you compile Apache w/ Cpanel's easyapache script (this is broken logic on Cpanel's part).
Be sure to remove the /var/cpanel/fileprotect file, if it exists, as that will enable the web root protection feature if it exists, and Cpanel will set the ownership and permissions on the user's web root directory to a setting that is invalid for suexec/phpsuexec and it will cause scripts to error due to the suexec checks (this is a good thing).
Be sure that any PHP scripts are set to the permissions of 644, 755, 750 or 700. Be sure that any directories the scripts are in are set to either 711 or 755. As another person suggested, check the .htaccess file for any php_flag directives, as those will cause the site to error as those are only valid in the Apache API (mod_php, no phpsuexec). Finally, you should provide the suexec_log and error_log data from the errors if it's still a problem, so someone here can suggest what might be wrong.
-
04-20-2006, 09:38 AM #6Newbie
- Join Date
- Feb 2006
- Posts
- 8
phpsuexec problem
I am having a similar problem. Although i have very carefully followed all the steps mentioned above. All dirs are chmod 755, files are chmod 644."Web root protection was disabled " when compiling php in WHM.
I am still getting 500 internal server error. the error_log says
premature end of script headers.
Plz help. has anybody successfully run phpsuexec on a WHM/cpanel server.
help will be appreciated
khalid
-
04-20-2006, 12:01 PM #7Web Hosting Master
- Join Date
- Jun 2005
- Posts
- 703
It can also be caused by symbolic links to files, you may want to check that.
ReflexNetworks means Happy Clients!
-
04-20-2006, 02:04 PM #8Newbie
- Join Date
- Feb 2006
- Posts
- 8
phpsuexec problem
nopes there are no symbolic links. i get the following in /usr/local/apache/logs/erro_log
[Thu Apr 20 12:08:18 2006] [error] [client xx.xxx.xx.xx] Premature end of script headers: /home/xxxx/public_html/xxx.php
[Thu Apr 20 12:08:18 2006] [error] (22)Invalid argument: setrlimit(RLIMIT_AS): failed to set memory usage limit
failed to open log file
fopen: Permission denied
-
04-21-2006, 11:26 AM #9Web Hosting Master
- Join Date
- Jun 2005
- Posts
- 703
Originally Posted by knkhan
Any chance you are on a 64bit OS?
Originally Posted by knkhanReflexNetworks means Happy Clients!
-
06-09-2007, 10:58 AM #10Newbie
- Join Date
- Mar 2005
- Location
- Ecuador
- Posts
- 12
a have the same problemn
-
06-09-2007, 11:22 AM #11Web Hosting Master
- Join Date
- Mar 2003
- Location
- Canada
- Posts
- 9,072
RACK911 Labs | Penetration Testing | https://www.RACK911Labs.ca
www.HostingSecList.com - Security Notices for the Hosting Community.
-
06-09-2007, 11:27 AM #12Newbie
- Join Date
- Mar 2005
- Location
- Ecuador
- Posts
- 12
[Sat Jun 9 10:26:34 2007] [error] (22)Invalid argument: setrlimit(RLIMIT_AS): failed to set memory usage limit
[Sat Jun 9 10:26:38 2007] [error] (22)Invalid argument: setrlimit(RLIMIT_AS): failed to set memory usage limit
[Sat Jun 9 10:26:39 2007] [error] (22)Invalid argument: setrlimit(RLIMIT_AS): failed to set memory usage limit
[Sat Jun 9 10:26:40 2007] [error] (22)Invalid argument: setrlimit(RLIMIT_AS): failed to set memory usage limit
[Sat Jun 9 10:26:42 2007] [error] (22)Invalid argument: setrlimit(RLIMIT_AS): failed to set memory usage limit
[Sat Jun 9 10:26:42 2007] [error] (22)Invalid argument: setrlimit(RLIMIT_AS): failed to set memory usage limit
[Sat Jun 9 10:26:43 2007] [error] (22)Invalid argument: setrlimit(RLIMIT_AS): failed to set memory usage limit
[Sat Jun 9 10:26:44 2007] [error] (22)Invalid argument: setrlimit(RLIMIT_AS): failed to set memory usage limit® { No HopE & No FeaR } ®
Be part of the change, because We are the change..
-
06-09-2007, 11:32 AM #13Web Hosting Master
- Join Date
- Mar 2003
- Location
- Canada
- Posts
- 9,072
You could try removing the RLimitMEM & RLimitCPU settings at the top of your httpd.conf, if it exists.
/usr/local/apache/conf/httpd.conf
Then restart Apache...RACK911 Labs | Penetration Testing | https://www.RACK911Labs.ca
www.HostingSecList.com - Security Notices for the Hosting Community.
-
06-09-2007, 12:58 PM #14Aspiring Evangelist
- Join Date
- Nov 2003
- Posts
- 350
Have you built a CGI version of PHP?
LiteSpeed Web Acceleration Platform by https://www.litespeedtech.com
Apache drop-in replacement. Triple server capacity with 10X performance increases.
Ultimate web serving platform for WordPress, Magento and other web applications.
Turbo charging all WordPress sites hosted on your server with a single click!
-
06-10-2007, 03:58 AM #15Junior Guru
- Join Date
- Apr 2003
- Location
- Brooklyn NY
- Posts
- 213
it wouls normally be because of PHP flags in .htaccess files, you should comment them out and then if you need register_globals for example, you woudl need to create a php.ini file in the folder of the script and type in it: register_globals = On
There can be many reasons for the errors, but this is the most common one.
-
06-10-2007, 11:08 AM #16Web Hosting Master
- Join Date
- Nov 2004
- Location
- Australia
- Posts
- 1,737
That setrlimit is unlikely to be the cause of the problem; some versions of Apache produce that error under normal operations. I'd look for writable files or directories, or php settings in .htaccess files, as others have posted.