php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24666 random blank pages for any code on any php page
Submitted: 2003-07-15 10:31 UTC Modified: 2003-08-30 07:15 UTC
Votes:7
Avg. Score:4.7 ± 0.7
Reproduced:6 of 6 (100.0%)
Same Version:6 (100.0%)
Same OS:5 (83.3%)
From: dhunter at uta dot edu Assigned:
Status: Closed Package: Apache related
PHP Version: 4.3.2 OS: Solaris 8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dhunter at uta dot edu
New email:
PHP Version: OS:

 

 [2003-07-15 10:31 UTC] dhunter at uta dot edu
Description:
------------
Pages that worked in 4.3.1 randomly print blank pages in version 4.3.2. There isn't any specific code that produces this quirk. A simple call to the header function to redirect a browser will produce a blank page. Also note the following:

1) error reporting is turned on
2) Using Apache 1.3.27
3) Apache does not segfault, no segfault occurs and child process does not die
4) no errors are reported in apache logs

Although the PHP engine and Apache do not report errors, the access log reports a 5 byte file size when a blank page is printed. For example, a page that is normally reported in the access log as 10,000 bytes is reported as 5 bytes when the PHP engine fails.

'./configure' '--prefix=/usr/local/apache_1327/php-4.3.1' '--with-apxs=/usr/local/apache_1327/bin/apxs' '--enable-sigchild' '--enable-magic-quotes' '--with-openssl=/usr/local/openssl' '--with-zlib=/usr/local' '--enable-bcmath' '--enable-calendar' '--with-gdbm=/usr/local/gdbm-1.8.0' '--with-db3=/usr/local/BerkeleyDB.3.3' '--enable-dbase' '--enable-dbx' '--enable-dio' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-zlib-dir=/usr/local' '--with-ttf' '--enable-gd-native-ttf' '--with-java=/usr/java1.2' '--with-ldap=/usr' '--enable-mbstring' '--enable-mbregex' '--with-mssql=/usr/local/freetds' '--with-mysql=/usr/local/mysql' '--with-mysql-sock=/usr/local/mysql/tmp/mysql.sock' '--with-zlib-dir=/usr/local' '--with-mm=/usr/local' '--enable-sockets' '--enable-wddx' '--enable-xslt' '--with-xslt-sablot=/usr/local' '--enable-memory-limit=yes' '--with-gnu-ld'


Reproduce code:
---------------
No specific code produces the bug. All pages are randomly printed nothing, blank.


Expected result:
----------------
output

Actual result:
--------------
no output

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-15 22:10 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

and cut down your configure line to bare minimum that you need for your pages to work.

Are you using output buffering features? (php.ini)
What is the diff between your php.ini and the php.ini-dist
in the 4.3.2 release? (diff -u)
Do you set any php.ini settings in httpd.conf / .htaccess
parts that might affect the pages involved?
Are you sure it's any script? Even plain <?php echo "foo"; ?> style script?


 [2003-07-16 15:56 UTC] dhunter at uta dot edu
Thanks,
I'll try the latest snapshot. I'll also try to cut down the configuration, but we use most of the options.

Answers to your questions:
- output buffering is on
- i'm using the php.ini-recommended that comes with 4.3.2. no differences except that i have safe mode on.
- i don't set any php.ini settings in .htaccess or httpd.conf.
- exactly right, any script randomly produces output and randomly produces no output as evidenced by observation and as recorded in the apache access log.

I downgraded to 4.3.1 to correct the problem for now.
 [2003-07-16 21:01 UTC] sniper@php.net
Could you try if you can reproduce this when you run apache like this:

# gdb httpd -X

(if you need SSL, add -DSSL there)

You should test the snapshot on separate instance/machine.
e.g. have another apache with PHP build from the snapshot
running in other port. (separate development server would be best choice though :)


 [2003-07-16 21:05 UTC] sniper@php.net
Oopps, made a slight mistake, run it like:

# gdb httpd
(gdb) run -X -DSSL

 [2003-07-20 17:35 UTC] dhunter at uta dot edu
Thanks for the input. I wasn't able to reproduce the error in debug mode. Maybe increased traffic increases the frequency of occurrence. Here is what I have done. I rebuilt all of the web server components, apache, ssl, php, using a newer version of gcc (3.2.3), and I removed some of php's configuration options. As I mentioned I wasn't able to reproduce the problem in apache's debug mode, and gdb didn't have anything to report. The problem continues to occur with the rebuilt components, so I am continuing to use 4.3.1 for now. I'll build the snapshot and see if the error is still present. 
Summary:
- plain html pages are ok.
- php pages randomly print blanks regardless of code.
- occurs with apache 1.3.27 or 1.3.28, and php 4.3.2 on sparc solaris 8
- php 4.3.1 works great
 [2003-07-21 18:03 UTC] iliaa@php.net
Try to enable logging of php errors and see if the php error contains any errors that could explain the cause for the blank pages.
 [2003-07-22 22:26 UTC] dhunter at uta dot edu
I've had php logging on the entire time. That's the reason I haven't been able to track this down. We have been using php extensively for a long time and I've never experienced this before. When a page prints blank the access log entry is:

www.uta.edu 64.12.96.203 - - [22/Jul/2003:21:59:00 -0500] "GET /uta/current HTTP/1.1" 200 5 "http://www.uta.edu/" "Mozilla/4.0 (compatible; MSIE 5.0; AOL 8.0; Windows 98; DigExt)"

The same page should report 22430 bytes like the following:

www.uta.edu 67.66.182.19 - - [22/Jul/2003:22:09:57 -0500] "GET /uta/current HTTP/1.1" 200 22430 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6 StumbleUpon/1.73"

What could have changed between 4.3.1 and 4.3.2 that could cause this.
 [2003-08-05 15:10 UTC] iliaa@php.net
Take at a look @ your apache's primary error log file, see if there are any messages from php or reports of crashed apache children.
 [2003-08-05 15:54 UTC] dhunter at uta dot edu
I did this prior to submitting the bug. See Description.
- Thanks
 [2003-08-25 17:19 UTC] dhunter at uta dot edu
I haven't had a chance to try the snapshot, but I am still experiencing the problem.
 [2003-08-25 19:01 UTC] iliaa@php.net
If you try the snapshot and the problem still exist THEN re-open the report, otherwise please leave it as is.
 [2003-08-30 07:15 UTC] sniper@php.net
Assumed this is fixed in 4.3.3.

 [2004-02-24 16:04 UTC] stevec at engr dot orst dot edu
I can comfirm that this bug still existed in PHP 4.3.3.  It appears to be resolved in 4.3.4.

I was able to gather a bit more information that may be moot now that it appears to be resolved.  The random blank pages didn't start happening for me until the web server had been running for several hours.  Using a script that tested document sizes, all pages were successful after restarting apache.  After several hours, it would fail around 30% of the time.

Nothing ever showed up in the apache logs (except 5byte file size) or a php error log.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue May 24 16:05:45 2022 UTC