ID: 32424
Updated by: thetaphi@php.net
Reported By: tommythekid at mac dot com
-Status: Assigned
+Status: Analyzed
Bug Type: iPlanet related
Operating System: Solaris 9 SPARC
PHP Version: 4.*, 5.*
Assigned To: thetaphi
Previous Comments:
------------------------------------------------------------------------
[2005-03-25 16:59:25] thetaphi@php.net
Hallo Jani,
I experienced that problem also in my servers in the past (in some
other use-case: using of the nsapi_virtual() function which does
implicitly a flush of the headers and buffers in the nsapi C code) but
I do not know exactly if it is a nsapi problem or some general
sapi/buffers problem.
What did you change? If it has something to do with NSAPI code please
send me a private email with your changes, because I am not familar
with the buffering code.
The interesting thing is:
This bug only happens when the flush/ob_flush is done before any output
to the client is done (the buffer is empty). In my case: nsapi_virtual()
is the first instruction in the php code.
Happens also in PHP 4.3.
If I should look after this bug after easter assign me to this bug.
------------------------------------------------------------------------
[2005-03-25 07:42:51] tommythekid at mac dot com
well.. I had to do a ./buildconf --force ... but at least that
compiles... and..
(with the ob_flush() after the headers)
HTTP/1.1 200 OK
Server: Sun-ONE-Web-Server/6.1
Date: Fri, 25 Mar 2005 06:40:13 GMT
Content-type: text/html
X-powered-by: PHP/5.0.4RC2
X-foo: BAR
Connection: close
(without the ob_flush() after the headers)
HTTP/1.1 200 OK
Server: Sun-ONE-Web-Server/6.1
Date: Fri, 25 Mar 2005 06:42:04 GMT
Content-type: text/html
X-powered-by: PHP/5.0.4RC2
X-foo: BAR
Connection: close
PRE
POST
--
So, looks like I am still affected.
------------------------------------------------------------------------
[2005-03-25 01:18:49] sniper@php.net
The compile bug is already mentioned in bug #30641 so let's forget
about that for now. Try this snapshot instead:
http://snaps.php.net/php5-STABLE-latest.tar.gz
------------------------------------------------------------------------
[2005-03-24 08:03:57] tommythekid at mac dot com
php-5.0.3 compiles cleanly with the same exact configure line :( ..
php5-200503240330 errors like below:
/bin/sh /var/tmp/php5-200503240330/libtool --silent --preserve-dup-deps
--mode=compile /var/tmp/php5-200503240330/meta_ccld -IZend/
-I/var/tmp/php5-200503240330/Zend/ -DPHP_ATOM_INC
-I/var/tmp/php5-200503240330/include -I/var/tmp/php5-200503240330/main
-I/var/tmp/php5-200503240330 -I/opt/SUNWwbsvr/plugins/include
-I/usr/local/include/libxml2 -I/usr/local/mysql/include
-I/var/tmp/php5-200503240330/TSRM -I/var/tmp/php5-200503240330/Zend
-D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -g
-O2 -pthreads -DZTS -c
/var/tmp/php5-200503240330/Zend/zend_reflection_api.c -o
Zend/zend_reflection_api.lo
/bin/sh /var/tmp/php5-200503240330/libtool --silent --preserve-dup-deps
--mode=compile /var/tmp/php5-200503240330/meta_ccld -IZend/
-I/var/tmp/php5-200503240330/Zend/ -DPHP_ATOM_INC
-I/var/tmp/php5-200503240330/include -I/var/tmp/php5-200503240330/main
-I/var/tmp/php5-200503240330 -I/opt/SUNWwbsvr/plugins/include
-I/usr/local/include/libxml2 -I/usr/local/mysql/include
-I/var/tmp/php5-200503240330/TSRM -I/var/tmp/php5-200503240330/Zend
-D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -g
-O2 -pthreads -DZTS -c /var/tmp/php5-200503240330/Zend/zend_execute.c
-o Zend/zend_execute.lo
/usr/ccs/bin/as: "/var/tmp//cc3rGt9t.s": error: symbol "zend_error" is
used but not defined
/usr/ccs/bin/as: "/var/tmp//cc3rGt9t.s": internal error:
evaluate_symbol_expression(): op 20?
gmake: *** [Zend/zend_execute.lo] Error 1
[root@dccmail php5-200503240330]#
------------------------------------------------------------------------
[2005-03-23 10:34:53] tommythekid at mac dot com
Description:
------------
no output is sent after calling ob_flush() after sending headers. This
problem appears to be NSAPI related. Removing the first ob_flush() from
the code produces the expected results.
Reproduce code:
---------------
while (ob_end_clean());
ob_start();
header("X-Foo: BAR");
ob_flush();
flush();
echo "PRE\n\n";
ob_flush();
flush();
echo "POST\n\n";
ob_flush();
flush();
Expected result:
----------------
HTTP/1.1 200 OK
Server: Sun-ONE-Web-Server/6.1
Date: Wed, 23 Mar 2005 09:31:45 GMT
Content-type: text/html
X-powered-by: PHP/5.0.3
X-foo: BAR
Connection: close
PRE
POST
Actual result:
--------------
HTTP/1.1 200 OK
Server: Sun-ONE-Web-Server/6.1
Date: Wed, 23 Mar 2005 09:24:38 GMT
Content-type: text/html
X-powered-by: PHP/5.0.3
X-foo: BAR
Connection: close
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32424&edit=1