#37205 [NEW]: Serving binary content (images) fails to "comm with server aborted" FastCGI err

From: Date: Wed, 26 Apr 2006 01:37:18 +0000
Subject: #37205 [NEW]: Serving binary content (images) fails to "comm with server aborted" FastCGI err
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-96233@lists.php.net to get a copy of this message
From:             phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version:      5CVS-2006-04-26 (CVS)
PHP Bug Type:     CGI related
Bug description:  Serving binary content (images) fails to "comm with server aborted"
FastCGI err

Description:
------------
I've just tested PHP 5.1.3RC4-dev (cgi-fcgi) (built: Apr 
26 2006 01:25:05).

The problem I've found seems to be related to:
 - Reimplemented FastCGI interface. (Dmitry)

If I serve a binary file (image) through PHP, the 
communication with the fastcgi server gets broken.



Reproduce code:
---------------
<?php
#header('Content-Type: image/gif');
echo file_get_contents(
'http://www.salonmarcharris.com/images/newburyhome.gif'
);
?>

or

<?php
#header('Content-Type: image/gif');
echo file_get_contents(
'http://www.hahler.de/skins/blueyed/img/hahler/powl.jpg'
);
?>


This is my fastcgi startup script:
#!/bin/sh
PHPRC="/XXX/webXXX/conf/php5"
export PHPRC
PHP_FCGI_CHILDREN=4
export PHP_FCGI_CHILDREN
exec /bin/php51_CVS-fcgi


This is how the server gets configured in
/etc/apache2/mods-enabled/fastcgi.conf:
FastCgiServer /XXX/fcgi-scripts/webXXX/php5-fcgi-starter -user webXXX
-group webXXX -pass-header HTTP_AUTHORIZATION -flush -idle-timeout 60

I've installed libapache2-mod-fastcgi 2.4.2-6 (Ubuntu Breezy).

Expected result:
----------------
Only the binary (image) data, without the "attached" "The 
server encountered an internal error or misconfiguration 
and was unable to complete your request." error message.

Actual result:
--------------
Binary data from the image and then the internal server 
error.

These are errors from the error log:
[Wed Apr 26 03:16:46 2006] [error] [client 83.135.205.222] 
FastCGI: comm with 
server "/XXX/fcgi-scripts/webXXX/php5-fcgi-starter" 
aborted: protocol error: invalid version: 152 != 
FCGI_VERSION(1)
(with the first URL provided above)
or

[Wed Apr 26 03:21:15 2006] [error] [client 83.135.205.222] 
(104)Connection reset by peer: FastCGI: comm with 
server "/XXX/fcgi-scripts/webXXX/php5-fcgi-starter" 
aborted: read failed
(with the second URL provided above)


-----
My .configure:
./configure \
--prefix=/home/XXX/make/php5 \
--with-config-file-path=/etc/php5 \
--with-pear=/XXX/lib/php5 \
--enable-calendar \
--enable-exif \
--enable-fastcgi \
--enable-force-cgi-redirect  \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-mbstring=all \
--enable-mbregex \
--enable-memcache \
--enable-memory-limit \
--enable-sockets \
--enable-track-vars \
--with-bz2 \
--with-dom \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv \
--with-imap \
--with-imap-ssl \
--with-jpeg-6b \
--with-jpeg-dir \
--with-kerberos \
--with-ldap \
--with-ldap-sasl \
--with-mcrypt \
--with-mysql \
--with-openssl \
--with-png-dir \
--without-mm \
--with-sqlite \
--with-pcre-regex \
--with-ttf \
--with-zlib \
--with-zlib-dir=/bin


-- 
Edit bug report at http://bugs.php.net/?id=37205&edit=1
-- 
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37205&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=37205&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37205&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37205&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=37205&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37205&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37205&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37205&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37205&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37205&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=37205&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=37205&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37205&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37205&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37205&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37205&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37205&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37205&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37205&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37205&r=mysqlcfg


Thread (12 messages)

« previous php.bugs (#96233) next »