Error 500: Premature end of script headers
It was a file permission issue.
All files on my website were set to a permission level of '644.' Once I changed the permission level to 705 (chmod 705
) everything worked. Note that I changed it to 705, but 755 will also work. I also changed the folder it was in to 701 (to hide it, but still be executable by the server).
Aside: I still don't understand why my .PHP file worked on the other server when it was probably set to 644?? How could Apache execute the script without world permission?? Does Apache not need world permission?? Just a few questions I still have...
Premature end of script headers: php5 Symfony produces internal server error 500
Recently I encountered similar issue. Replacing file caching with APC solved my problems completely. I needed to replace sfFileCache for view_cache, i18n cache and routing.
If APC is not available on your server than you can easily use any other popular accelerator instead.
How to use APC with symfony: http://www.zalas.eu/symfony-meets-apc-alternative-php-cache
Symfony2 app_dev.php only error 500 Premature end of script
I have commented firephp and chromephp in config_dev.yml :
imports:
- { resource: config.yml }
framework:
router:
resource: "%kernel.root_dir%/config/routing_dev.yml"
strict_requirements: true
profiler: { only_exceptions: false }
web_profiler:
toolbar: true
intercept_redirects: false
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
# firephp:
# type: firephp
# level: info
# chromephp:
# type: chromephp
# level: info
assetic:
use_controller: true
#swiftmailer:
# delivery_address: me@example.com
Premature end of script headers Error in python cgi script
change the header as:
print "Content-type: text/html\n\n"
Related Topics
Required_If Laravel 5 Validation
How to Find Array/Dictionary Value Using Key
I Have a Base64 Encoded Png, How to Write the Image to a File in PHP
Codeigniter Assets Folder Best Practice
How to Get the Last Path in a Url
PHP - How to Implement Password Reset and Token Expiry
How to Select Rows Where Column Value Is Not Null Using Codeigniter's Activerecord
PHP Artisan Migrate Throwing [Pdo Exception] Could Not Find Driver - Using Laravel
Change Name of Laravel's Created_At and Updated_At
Php: Limit Foreach() Statement
Move All Files in a Folder to Another
Www to Non-Www Redirect with PHP
Differencebetween Null and Empty
Arabic Characters in JSON Decoding
Php: Get List of All Filenames Contained Within My Images Directory
Windows Cmd.Exe "The System Cannot Find the Path Specified."