PHP with suEXEC support issues

Hello! 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!

How to fix 500 error 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.

  • Back to HowTos
  • 100% Managed Dedicated Servers

    • 32-64 GB of DDR3 Memory
    • 3 TB SATA III disks
    • Free cPanel/WHM
    • Free Offsite Backups

    Premium Reseller Hosting Plans

    • Unlimited Domains
    • Unlimited Users
    • Free SSL and IPs
    • Save 25% today!