Premature end of script headers:

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785

Premature end of script headers:

Postby SailFan » Tue Jun 27, 2006 11:52 am

Starting sunday morning I lost three of my phpbb installs. This is what a user sees when the try to access:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@[domain].com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.34 Server at www.[domain].com Port 80


In the error log I see this all over the place: "Premature end of script headers:"

I've made no changes to the sites involved, but they are all on the same server at Page-Zone. Searching here I see that the problem is on the host side and I have told them that but so far no fix.

Your phpBB board URL: [private]
Template(s) used: subSilver
Any and all MODs: attachment, album, easymod
Do you use a port of phpBB: no
Version of phpBB: 2.0.19
Version of PHP: 4.4.2
Which database server and version: MySQL 4.1.19
Host: Page-Zone
Did someone install this for you/who: no
Is this an upgrade/from what to what: various upgrades since 2.0.6
Is this a conversion/from what to what: no
Have you searched for your problem: yes
If so, what terms did you try: See above
State the nature of your problem: See above
Do you have a test account for us: no




Here is what getinfo() tells me about the server environment.
Anyone see any configuration issue?

Code: Select all
PHP Version 4.4.2

System    Linux serve.[server].net 2.4.21-32.0.1.ELsmp #1 SMP Wed May 25 14:26:33 EDT 2005 i686
Build Date    Mar 2 2006 15:09:53
Configure Command    './configure' '--prefix=/usr' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-iconv' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--enable-memory-limit' '--with-mhash' '--enable-magic-quotes' '--with-mysql=/usr' '--enable-discard-path' '--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-zlib'
Server API    CGI
Virtual Directory Support    disabled
Configuration File (php.ini) Path    /usr/local/lib/php.ini
PHP API    20020918
PHP Extension    20020429
Zend Extension    20050606
Debug Build    no
Zend Memory Manager    enabled
Thread Safety    disabled
Registered PHP Streams    php, http, ftp, compress.zlib

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

PHP Credits
Configuration
PHP Core
Directive   Local Value   Master Value
allow_call_time_pass_reference   On   On
allow_url_fopen   On   On
always_populate_raw_post_data   Off   Off
arg_separator.input   &   &
arg_separator.output   &   &
asp_tags   Off   Off
auto_append_file   no value   no value
auto_prepend_file   no value   no value
browscap   no value   no value
default_charset   no value   no value
default_mimetype   text/html   text/html
define_syslog_variables   Off   Off
disable_classes   no value   no value
disable_functions   no value   no value
display_errors   On   On
display_startup_errors   Off   Off
doc_root   no value   no value
docref_ext   no value   no value
docref_root   no value   no value
enable_dl   On   On
error_append_string   no value   no value
error_log   error_log   error_log
error_prepend_string   no value   no value
error_reporting   2039   2039
expose_php   On   On
extension_dir   ./   ./
file_uploads   On   On
gpc_order   GPC   GPC
highlight.bg   #FFFFFF   #FFFFFF
highlight.comment   #FF8000   #FF8000
highlight.default   #0000BB   #0000BB
highlight.html   #000000   #000000
highlight.keyword   #007700   #007700
highlight.string   #DD0000   #DD0000
html_errors   On   On
ignore_repeated_errors   Off   Off
ignore_repeated_source   Off   Off
ignore_user_abort   Off   Off
implicit_flush   Off   Off
include_path   .:/usr/lib/php:/usr/local/lib/php   .:/usr/lib/php:/usr/local/lib/php
log_errors   On   On
log_errors_max_len   1024   1024
magic_quotes_gpc   On   On
magic_quotes_runtime   Off   Off
magic_quotes_sybase   Off   Off
max_execution_time   900   900
max_input_time   -1   -1
memory_limit   24M   24M
open_basedir   no value   no value
output_buffering   no value   no value
output_handler   no value   no value
post_max_size   55M   55M
precision   14   14
register_argc_argv   On   On
register_globals   On   On
report_memleaks   On   On
safe_mode   Off   Off
safe_mode_exec_dir   no value   no value
safe_mode_gid   Off   Off
safe_mode_include_dir   no value   no value
sendmail_from   no value   no value
sendmail_path   /usr/sbin/sendmail -t -i   /usr/sbin/sendmail -t -i
serialize_precision   100   100
short_open_tag   On   On
SMTP   localhost   localhost
smtp_port   25   25
sql.safe_mode   Off   Off
track_errors   Off   Off
unserialize_callback_func   no value   no value
upload_max_filesize   2M   2M
upload_tmp_dir   no value   no value
user_dir   no value   no value
variables_order   EGPCS   EGPCS
xmlrpc_error_number   0   0
xmlrpc_errors   Off   Off
y2k_compliance   Off   Off

bcmath
BCMath support    enabled

calendar
Calendar support    enabled

ctype
ctype functions    enabled

curl
CURL support    enabled
CURL Information    libcurl/7.12.0 OpenSSL/0.9.7a zlib/1.1.4

ftp
FTP support    enabled

gd
GD Support    enabled
GD Version    bundled (2.0.28 compatible)
FreeType Support    enabled
FreeType Linkage    with freetype
GIF Read Support    enabled
GIF Create Support    enabled
JPG Support    enabled
PNG Support    enabled
WBMP Support    enabled
XBM Support    enabled

gettext
GetText Support    enabled

iconv
iconv support    enabled
iconv implementation    glibc
iconv library version    2.3.2

Directive   Local Value   Master Value
iconv.input_encoding   ISO-8859-1   ISO-8859-1
iconv.internal_encoding   ISO-8859-1   ISO-8859-1
iconv.output_encoding   ISO-8859-1   ISO-8859-1

imap
IMAP c-Client Version    2001
SSL Support    enabled
Kerberos Support    enabled

mbstring
Multibyte Support    enabled
Japanese support    enabled
Simplified chinese support    enabled
Traditional chinese support    enabled
Korean support    enabled
Russian support    enabled
Multibyte (japanese) regex support    enabled

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Directive   Local Value   Master Value
mbstring.detect_order   no value   no value
mbstring.encoding_translation   Off   Off
mbstring.func_overload   0   0
mbstring.http_input   pass   pass
mbstring.http_output   pass   pass
mbstring.internal_encoding   ISO-8859-1   no value
mbstring.language   neutral   neutral
mbstring.substitute_character   no value   no value

mcrypt
mcrypt support   enabled
version    >= 2.4.x
Supported ciphers    cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes
Supported modes    cbc cfb ctr ecb ncfb nofb ofb stream

Directive   Local Value   Master Value
mcrypt.algorithms_dir   no value   no value
mcrypt.modes_dir   no value   no value

mhash
MHASH support    Enabled
MHASH API Version    20020524

mysql
MySQL Support   enabled
Active Persistent Links    0
Active Links    0
Client API version    4.1.19
MYSQL_MODULE_TYPE    external
MYSQL_SOCKET    /var/lib/mysql/mysql.sock
MYSQL_INCLUDE    -I/usr/include/mysql
MYSQL_LIBS    -L/usr/lib -lmysqlclient

Directive   Local Value   Master Value
mysql.allow_persistent   On   On
mysql.connect_timeout   60   60
mysql.default_host   no value   no value
mysql.default_password   no value   no value
mysql.default_port   no value   no value
mysql.default_socket   no value   no value
mysql.default_user   no value   no value
mysql.max_links   Unlimited   Unlimited
mysql.max_persistent   Unlimited   Unlimited
mysql.trace_mode   Off   Off

overload
User-Space Object Overloading Support    enabled

pcre
PCRE (Perl Compatible Regular Expressions) Support    enabled
PCRE Library Version    6.2 01-Aug-2005

posix
Revision    $Revision: 1.51.2.4.2.1 $

session
Session Support    enabled
Registered save handlers    files user

Directive   Local Value   Master Value
session.auto_start   Off   Off
session.bug_compat_42   On   On
session.bug_compat_warn   On   On
session.cache_expire   180   180
session.cache_limiter   nocache   nocache
session.cookie_domain   no value   no value
session.cookie_lifetime   0   0
session.cookie_path   /   /
session.cookie_secure   Off   Off
session.entropy_file   no value   no value
session.entropy_length   0   0
session.gc_divisor   100   100
session.gc_maxlifetime   1440   1440
session.gc_probability   1   1
session.name   PHPSESSID   PHPSESSID
session.referer_check   no value   no value
session.save_handler   files   files
session.save_path   /tmp   /tmp
session.serialize_handler   php   php
session.use_cookies   On   On
session.use_only_cookies   Off   Off
session.use_trans_sid   On   On

sockets
Sockets Support    enabled

standard
Regex Library    Bundled library enabled
Dynamic Library Support    enabled
Path to sendmail    /usr/sbin/sendmail -t -i

Directive   Local Value   Master Value
assert.active   1   1
assert.bail   0   0
assert.callback   no value   no value
assert.quiet_eval   0   0
assert.warning   1   1
auto_detect_line_endings   0   0
default_socket_timeout   60   60
safe_mode_allowed_env_vars   PHP_   PHP_
safe_mode_protected_env_vars   LD_LIBRARY_PATH   LD_LIBRARY_PATH
url_rewriter.tags   a=href,area=href,frame=src,form=,fieldset=   a=href,area=href,frame=src,form=,fieldset=
user_agent   no value   no value

tokenizer
Tokenizer Support    enabled

xml
XML Support    active
XML Namespace Support    active
EXPAT Version    1.95.6

xslt
XSLT support    enabled
Backend    Sablotron
Sablotron Version    1.0.1
Sablotron Information    Cflags: -g -O2 Libs: -L/usr/lib -lexpat Prefix: /usr

zlib
ZLib Support    enabled
Compiled Version    1.1.4
Linked Version    1.1.4

Directive   Local Value   Master Value
zlib.output_compression   Off   Off
zlib.output_compression_level   -1   -1
zlib.output_handler   no value   no value

Additional Modules
Module Name

Environment
Variable   Value
PATH    /usr/local/bin:/usr/bin:/bin
DOCUMENT_ROOT    [server]/public_html
HTTP_ACCEPT    text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_CHARSET    ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_ACCEPT_ENCODING    gzip,deflate
HTTP_ACCEPT_LANGUAGE    en-us,en;q=0.5
HTTP_CONNECTION    keep-alive
HTTP_COOKIE    cprelogin=no
HTTP_HOST    [domain]
HTTP_KEEP_ALIVE    300
HTTP_USER_AGENT    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
REMOTE_ADDR    xx.xx.xx.xx
REMOTE_PORT    2469
SCRIPT_FILENAME    [server]/public_html/getinfo.php
SERVER_ADDR    x.xx.xx.xx
SERVER_ADMIN    webmaster@[domain]
SERVER_NAME    www.[domain].com
SERVER_PORT    80
SERVER_SOFTWARE    Apache 3
GATEWAY_INTERFACE    CGI/1.1
SERVER_PROTOCOL    HTTP/1.1
REQUEST_METHOD    GET
QUERY_STRING    no value
REQUEST_URI    /getinfo.php
SCRIPT_NAME    /getinfo.php

PHP Variables
Variable   Value
PHP_SELF    /getinfo.php
_REQUEST["cprelogin"]   no
_COOKIE["cprelogin"]   no
_SERVER["PATH"]   /usr/local/bin:/usr/bin:/bin
_SERVER["DOCUMENT_ROOT"]   [server]/public_html
_SERVER["HTTP_ACCEPT"]   text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
_SERVER["HTTP_ACCEPT_CHARSET"]   ISO-8859-1,utf-8;q=0.7,*;q=0.7
_SERVER["HTTP_ACCEPT_ENCODING"]   gzip,deflate
_SERVER["HTTP_ACCEPT_LANGUAGE"]   en-us,en;q=0.5
_SERVER["HTTP_CONNECTION"]   keep-alive
_SERVER["HTTP_COOKIE"]   cprelogin=no
_SERVER["HTTP_HOST"]   [domain]
_SERVER["HTTP_KEEP_ALIVE"]   300
_SERVER["HTTP_USER_AGENT"]   Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
_SERVER["REMOTE_ADDR"]   xx.xx.xx.xx
_SERVER["REMOTE_PORT"]   2469
_SERVER["SCRIPT_FILENAME"]   [server]/public_html/getinfo.php
_SERVER["SERVER_ADDR"]   xx.xx.xx.xx
_SERVER["SERVER_ADMIN"]   webmaster@[domain]
_SERVER["SERVER_NAME"]   [domain]
_SERVER["SERVER_PORT"]   80
_SERVER["SERVER_SOFTWARE"]   Apache 3
_SERVER["GATEWAY_INTERFACE"]   CGI/1.1
_SERVER["SERVER_PROTOCOL"]   HTTP/1.1
_SERVER["REQUEST_METHOD"]   GET
_SERVER["QUERY_STRING"]   no value
_SERVER["REQUEST_URI"]   /getinfo.php
_SERVER["SCRIPT_NAME"]   /getinfo.php
_SERVER["PHP_SELF"]   /getinfo.php
_SERVER["argv"]   

Array
(
)

_SERVER["argc"]   0
_ENV["PATH"]   /usr/local/bin:/usr/bin:/bin
_ENV["DOCUMENT_ROOT"]   [server]/public_html
_ENV["HTTP_ACCEPT"]   text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
_ENV["HTTP_ACCEPT_CHARSET"]   ISO-8859-1,utf-8;q=0.7,*;q=0.7
_ENV["HTTP_ACCEPT_ENCODING"]   gzip,deflate
_ENV["HTTP_ACCEPT_LANGUAGE"]   en-us,en;q=0.5
_ENV["HTTP_CONNECTION"]   keep-alive
_ENV["HTTP_COOKIE"]   cprelogin=no
_ENV["HTTP_HOST"]   [domain]
_ENV["HTTP_KEEP_ALIVE"]   300
_ENV["HTTP_USER_AGENT"]   Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
_ENV["REMOTE_ADDR"]   xx.xx.xx.xx
_ENV["REMOTE_PORT"]   2469
_ENV["SCRIPT_FILENAME"]   [server]/public_html/getinfo.php
_ENV["SERVER_ADDR"]   xx.xx.xx.xx
_ENV["SERVER_ADMIN"]   webmaster@[domain]
_ENV["SERVER_NAME"]   [domain]
_ENV["SERVER_PORT"]   80
_ENV["SERVER_SOFTWARE"]   Apache 3
_ENV["GATEWAY_INTERFACE"]   CGI/1.1
_ENV["SERVER_PROTOCOL"]   HTTP/1.1
_ENV["REQUEST_METHOD"]   GET
_ENV["QUERY_STRING"]   no value
_ENV["REQUEST_URI"]   /getinfo.php
_ENV["SCRIPT_NAME"]   /getinfo.php

PHP License

This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net.
SailFan
Registered User
 
Posts: 84
Joined: Fri Mar 05, 2004 5:58 pm

Postby SailFan » Tue Jun 27, 2006 4:39 pm

Update:

I have three sites affected right now.

One of them - no one can get in - all get the error message above.

Another - I can see the index, but clicking anything gets me that error. Others see the error immediatley (only 3 other users)

Another - only some people are seeing the error. I can login and read posts, but if I try to go to admin I get the error.

:?
SailFan
Registered User
 
Posts: 84
Joined: Fri Mar 05, 2004 5:58 pm

Postby espicom » Tue Jun 27, 2006 4:41 pm

Number 1 suspect - your host added "mod_security", and has not properly configured the rules set. This will manifest itself in a lot of different ways - often, only certain pages will load, while others will give "forbidden" or ISE500 errors.

Not seeing PHP errors in the error log makes this a more likely scenerio, especially given the sudden onset with no changes on your part.
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer
User avatar
espicom
Registered User
 
Posts: 17906
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Postby SailFan » Tue Jun 27, 2006 5:49 pm

Thanks, Jeff, I will pass that along to them to check.
SailFan
Registered User
 
Posts: 84
Joined: Fri Mar 05, 2004 5:58 pm

Postby SailFan » Tue Jun 27, 2006 5:54 pm

Question: I don't see anything in my post that indicates that "mod_security" has been added. Is this a hunch, or are there indicators that I would not recognoze?

Thanks again!
SailFan
Registered User
 
Posts: 84
Joined: Fri Mar 05, 2004 5:58 pm

Postby espicom » Tue Jun 27, 2006 6:48 pm

It's a hunch, based upon the fact that over 50% of the "403 forbidden" and "ISE500" complaints (probably more than 90%) around here have mod_security at their root. It is either stopping the execution of the script (ISE500) or telling Apache that it's not allowed to load it (403). And it will do it on words like "cat", "curl", "system", "exec", or any other PHP or shell command in them, even words that end in "sh"!

The mod_security website warns ISPs to test their settings with the "logging" option before turning on REJECT, but few do. And the default rules set is not compatible with PHPBB...
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer
User avatar
espicom
Registered User
 
Posts: 17906
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Postby SailFan » Tue Jun 27, 2006 10:13 pm

Looks like a recompile of Apache was what was needed:

page zone wrote:I recompiled apache etc.. on 14 and a test forum I installed seems to work


All 3 forums work again. Whew.
SailFan
Registered User
 
Posts: 84
Joined: Fri Mar 05, 2004 5:58 pm

Postby Lumpy Burgertushie » Tue Jun 27, 2006 10:32 pm

SailFan wrote:Looks like a recompile of Apache was what was needed:

page zone wrote:I recompiled apache etc.. on 14 and a test forum I installed seems to work


All 3 forums work again. Whew.


which means that they probably redid the mod security thing in the process.

robert
Private support on a donation basis. PM me.
Image
NEW phpBB2 SUPPORT SITE
User avatar
Lumpy Burgertushie
Registered User
 
Posts: 36246
Joined: Mon May 02, 2005 3:11 am


Return to 2.0.x Support Forum

Who is online

Users browsing this forum: No registered users and 7 guests