Getting error "End of script output before headers: ea-php56"
Hi
We are using Cloudlinux 7.5 and experiencing a 503 error on just one page of a website.
The host are helpful and have looked into it and found the following error:
[Tue Jun 12 21:02:29.381172 2018] [cgid:error] [pid 447038:tid 140492432189184] [client IPREMOVED:63043] End of script output before headers: ea-php56
The site is supposed to be running PHP 7 so it's a bit odd it's referring to ea-php56. However, I have added a phpinfo file on the site and it confirms we are running PHP 7.
If it was a code file I was expecting to see the name of the file, not sure what to do next solving this issue?
Thanks
Dave
-
Hi @madesimplemedia It does seem odd that it would be referencing php 5.6. Do you know what PHP handler you're using (it should be listed in the phpinfo page)? What's in the .htaccess for the domain? Thanks! 0 -
Hi thanks for your reply. The handler is LiteSpeed V7.1 The host rolled back to Apache and said the error was still there. .htaccess contains a few rewrite rules, nothing that would potentially cause this issue, although the server has added this too: # BEGIN cPanel-generated php ini directives, do not edit # Manual editing of this file may result in unexpected behavior. # To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor) # For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI) php_flag asp_tags Off php_flag display_errors Off php_value max_execution_time 120 php_value max_input_time 120 php_value max_input_vars 10000 php_value memory_limit 256M php_value post_max_size 256M php_value session.gc_maxlifetime 1440 php_value session.save_path "/var/cpanel/php/sessions/ea-php56" php_value upload_max_filesize 256M php_flag zlib.output_compression On # END cPanel-generated php ini directives, do not edit # php -- BEGIN cPanel-generated handler, do not edit # Set the "ea-php70" package as the default "PHP" programming language. AddType application/x-httpd-ea-php70 .php .php7 .phtml # php -- END cPanel-generated handler, do not edit0 -
Hi @madesimplemedia This seems to be the issue: # BEGIN cPanel-generated php ini directives, do not edit # Manual editing of this file may result in unexpected behavior. # To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor) # For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI) php_flag asp_tags Off php_flag display_errors Off php_value max_execution_time 120 php_value max_input_time 120 php_value max_input_vars 10000 php_value memory_limit 256M php_value post_max_size 256M php_value session.gc_maxlifetime 1440 php_value session.save_path "/var/cpanel/php/sessions/ea-php56" php_value upload_max_filesize 256M php_flag zlib.output_compression On # END cPanel-generated php ini directives, do not edit
Based on this it seems that at some point you were running php 5.6 and these values weren't replaced when you moved to a different version of PHP. Though, it does say not to remove this due to unexpected behavior it should be only relevant if you're using that version of PHP and I'd like to know if the issue persists if you remove it. Thanks!0 -
Sorry I also have this on the end of the htaccess file: # php -- BEGIN cPanel-generated handler, do not edit # Set the "ea-php70" package as the default "PHP" programming language. AddType application/x-httpd-ea-php70 .php .php7 .phtml # php -- END cPanel-generated handler, do not edit
I removed the PHP5 code but it hasn't made any difference unfortunately. I did a graceful restart of Litespeed too but no change.0 -
That last portion with the AddType for PHP 7.0 is fine if you're using PHP 7.0. Can you show me the php info page values for the following: PHP Version Server API Configuration File Loaded Configuration File Scan this dir for additional .ini files Additional .ini files parsed 0 -
Here we go: PHP Version 7.0.30 Server API LiteSpeed V7.1 Configuration File /opt/cpanel/ea-php70/root/etc Loaded Configuration File /opt/cpanel/ea-php70/root/etc/php.ini Scan this dir for additional .ini files /opt/cpanel/ea-php70/root/etc/php.d Additional .ini files parsed: /opt/cpanel/ea-php70/root/etc/php.d/10-opcache.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-bcmath.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-bz2.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-calendar.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-ctype.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-curl.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-dba.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-dom.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-enchant.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-exif.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-fileinfo.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-ftp.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-gd.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-gettext.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-gmp.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-iconv.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-imap.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-intl.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-json.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-ldap.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-mbstring.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-mcrypt.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-mysqlnd.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-odbc.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-pdo.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-pgsql.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-phar.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-posix.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-pspell.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-shmop.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-simplexml.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-snmp.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-soap.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-sockets.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-sqlite3.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-sysvmsg.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-sysvsem.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-sysvshm.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-tokenizer.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-xml.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-xmlwriter.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-xsl.ini, /opt/cpanel/ea-php70/root/etc/php.d/20-zip.ini, /opt/cpanel/ea-php70/root/etc/php.d/30-mysqli.ini, /opt/cpanel/ea-php70/root/etc/php.d/30-pdo_mysql.ini, /opt/cpanel/ea-php70/root/etc/php.d/30-pdo_odbc.ini, /opt/cpanel/ea-php70/root/etc/php.d/30-pdo_pgsql.ini, /opt/cpanel/ea-php70/root/etc/php.d/30-pdo_sqlite.ini, /opt/cpanel/ea-php70/root/etc/php.d/30-wddx.ini, /opt/cpanel/ea-php70/root/etc/php.d/30-xmlreader.ini, /opt/cpanel/ea-php70/root/etc/php.d/30-xmlrpc.ini, /opt/cpanel/ea-php70/root/etc/php.d/zzzzzzz-pecl.ini0 -
Since the php info .php page executes within the directory could you please review the issue occuring php script permissions and the coding . 0 -
Sorry I'm not sure what you mean? 0 -
You know what, I think this is a code issue. I made a change and the page came back, I'm going to work on the code. Thanks for your help. 0 -
Hi @madesimplemedia Great, let us know if it continues after you make some changes. Thanks! 0 -
I am having a similar issue End of script output before headers: index.php and a few days ago the server added this code to my htaccess file # BEGIN cPanel-generated php ini directives, do not edit # Manual editing of this file may result in unexpected behavior. # To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor) # For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI) php_flag display_errors On php_value max_execution_time 300 php_value max_input_time 600 php_value max_input_vars 1000 php_value memory_limit 512M php_value post_max_size 256M php_value session.gc_maxlifetime 1440 php_value session.save_path "/var/cpanel/php/sessions/ea-php70" php_value upload_max_filesize 128M php_flag zlib.output_compression Off # END cPanel-generated php ini directives, do not edit
And i also have to files that i hadn't a month ago (i checked the backup) the files are php.ini and .user.ini both files contains the same code: user.ini; cPanel-generated php ini directives, do not edit ; Manual editing of this file may result in unexpected behavior. ; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor) ; For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI) display_errors = On max_execution_time = 300 max_input_time = 600 max_input_vars = 1000 memory_limit = 1024M post_max_size = 256M session.gc_maxlifetime = 1440 session.save_path = "/var/cpanel/php/sessions/ea-php70" upload_max_filesize = 128M zlib.output_compression = Off
and php.ini; cPanel-generated php ini directives, do not edit ; Manual editing of this file may result in unexpected behavior. ; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor) ; For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI) allow_url_fopen = On allow_url_include = Off display_errors = On enable_dl = Off file_uploads = On max_execution_time = 300 max_input_time = 600 max_input_vars = 1000 memory_limit = 512M post_max_size = 256M session.gc_maxlifetime = 1440 session.save_path = "/var/cpanel/php/sessions/ea-php70" upload_max_filesize = 128M zlib.output_compression = Off0 -
Hi @Davidjr150 If you're using php 7.0 this shouldn't be an issue. Do you have PHP error logging enabled? I'd suggest checking there first. 0
Please sign in to leave a comment.
Comments
12 comments