|
Main page Web Hosting Tutorials
Billing Issues
Community Forums
Network Status
Contact WestNIC
PHP with suEXEC support issuesHello! When I load my website, I get 500 error (Internal Server Error). Error_log shows "Premature end of script headers" and "file is writable by others". All scripts worked fine before! We still have few OLD servers running with latest PHP 4.x without SuEXEC support. This year we decided to upgrade old servers and activate SuEXEC support. What is SuEXEC? This feature helps tighten security, tracks all scripts, logs activity and forces scripts to run as an actual user instead of "nobody". Most users are not affected by this upgrade (see below). How to fix issues above.1. Check your file/folders permissions. PHP/CGI scripts must be set to 755 and regular files to 644. You can also set read/write files to 666. 777 permissions won't work anymore for security reasons. 2. Comment out .htaccess settings or delete the .htaccess files. You should create those settings in a php.ini file within each directory you are running php scripts (that have .htaccess files). Please remember: you cannot manipulate the php.ini settings with .htaccess when running PHP as cgi/phpsuexec. If you are using .htaccess with php_value entries within it, you would receive "Internal Server Error" (500) when attempting to access the scripts. This is because PHP is no longer running as an Apache module and Apache will not handle those directives any longer. All PHP values should be removed from your .htaccess files to avoid this issue. Placing a php.ini file in its place will solve this problem. © Copyright 20022008 WestNIC.net |