Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Getting error "End of script output before headers: ea-php56"

Discussion in 'CloudLinux' started by madesimplemedia, Jun 12, 2018.

  1. madesimplemedia

    Joined:
    Jun 12, 2018
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Sussex, UK
    cPanel Access Level:
    Reseller Owner
    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
    [Tue Jun 12 21:02:31.561387 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
     
    #1 madesimplemedia, Jun 12, 2018
    Last edited by a moderator: Jun 12, 2018
  2. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,387
    Likes Received:
    92
    Trophy Points:
    103
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. madesimplemedia

    Joined:
    Jun 12, 2018
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Sussex, UK
    cPanel Access Level:
    Reseller Owner
    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:

    Code:
    # 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)
    <IfModule php5_module>
       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
    </IfModule>
    # 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.
    <IfModule mime_module>
      AddType application/x-httpd-ea-php70 .php .php7 .phtml
    </IfModule>
    # php -- END cPanel-generated handler, do not edit
    
    
     
  4. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,387
    Likes Received:
    92
    Trophy Points:
    103
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @madesimplemedia

    This seems to be the issue:

    Code:
    # 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)
    <IfModule php5_module>
       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
    </IfModule>
    # 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!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. madesimplemedia

    Joined:
    Jun 12, 2018
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Sussex, UK
    cPanel Access Level:
    Reseller Owner
    Sorry I also have this on the end of the htaccess file:
    Code:
    # php -- BEGIN cPanel-generated handler, do not edit
    # Set the “ea-php70” package as the default “PHP” programming language.
    <IfModule mime_module>
      AddType application/x-httpd-ea-php70 .php .php7 .phtml
    </IfModule>
    # 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.
     
  6. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,387
    Likes Received:
    92
    Trophy Points:
    103
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. madesimplemedia

    Joined:
    Jun 12, 2018
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Sussex, UK
    cPanel Access Level:
    Reseller Owner
    Here we go:

    Code:
    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.ini
    
     
  8. sktest123

    sktest123 Well-Known Member

    Joined:
    Jan 31, 2017
    Messages:
    93
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    kochin
    cPanel Access Level:
    Root Administrator
    Since the php info .php page executes within the directory could you please review the issue occuring php script permissions and the coding .
     
  9. madesimplemedia

    Joined:
    Jun 12, 2018
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Sussex, UK
    cPanel Access Level:
    Reseller Owner
    Sorry I'm not sure what you mean?
     
  10. madesimplemedia

    Joined:
    Jun 12, 2018
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    West Sussex, UK
    cPanel Access Level:
    Reseller Owner
    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.
     
  11. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,387
    Likes Received:
    92
    Trophy Points:
    103
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @madesimplemedia


    Great, let us know if it continues after you make some changes.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice