ID:               22154
 User updated by:  [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Apache related
 Operating System: Linux 2.4.18-10
 PHP Version:      4.3.0
 New Comment:

After a whole lot more testing tonight, I've discovered a few nasty
annoying things.

Outline of what I'm trying to do:

A self serve support center for users.
Users login into a session
Session checkes user credentials in an LDAP directory
Session variables stored in MySQL database
>From the support site users may download patches & updates
Users can open a support request.

So, nothing too weird.  If I comment out all of my session material it
works. Using any session handling functions downloads work up to 1MB. 
If I comment out the LDAP authentication, the behavior is the same.  If
I comment out the MySQL handler and use the PHP default file handler,
the behavior is the same.  If I comment out the session handling, the
LDAP authentication and the DBMS stuff the downloads work.

I've gotten the Apache thread to exit and dump all the contents of all
the script variables to the web browser screen with no core dump.

All this indicates to me something in the PHP session handling is
stampling memory allocations.  Especially since I've gotten the same
results using an fread() loop instead of fpassthru().


Previous Comments:
------------------------------------------------------------------------

[2003-02-10 18:40:07] [EMAIL PROTECTED]

>From the testing I have done, files smaller than one meg seem to work
fine, but large files break in the manner described below.

------------------------------------------------------------------------

[2003-02-10 18:36:16] [EMAIL PROTECTED]

Can't build snapshot as apache mod...

Here's the error:

/bin/sh /home/joem/php/php4-STABLE-200302102230/libtool --mode=compile
gcc -I/opt/IBMHTTPServer/include -Isapi/apache/
-I/home/joem/php/php4-STABLE-200302102230/sapi/apache/ -DPHP_ATOM_INC
-I/home/joem/php/php4-STABLE-200302102230/include
-I/home/joem/php/php4-STABLE-200302102230/main
-I/home/joem/php/php4-STABLE-200302102230
-I/home/joem/php/php4-STABLE-200302102230/Zend -I/usr/include/libxml2
-I/usr/include/imap -I/home/joem/php/ldap/include
-I/home/joem/php/libmcal -I/usr/local/include
-I/home/joem/php/mysql/include/mysql -I/usr/include/ucd-snmp
-I/home/joem/php/php4-STABLE-200302102230/ext/xml/expat  -DLINUX=22
-DUSE_HSREGEX -DUSE_EXPAT
-I/home/joem/php/php4-STABLE-200302102230/TSRM  -g -Wall  -prefer-pic
-c /home/joem/php/php4-STABLE-200302102230/sapi/apache/mod_php4.c -o
sapi/apache/mod_php4.lo 
gcc -I/opt/IBMHTTPServer/include -Isapi/apache/
-I/home/joem/php/php4-STABLE-200302102230/sapi/apache/ -DPHP_ATOM_INC
-I/home/joem/php/php4-STABLE-200302102230/include
-I/home/joem/php/php4-STABLE-200302102230/main
-I/home/joem/php/php4-STABLE-200302102230
-I/home/joem/php/php4-STABLE-200302102230/Zend -I/usr/include/libxml2
-I/usr/include/imap -I/home/joem/php/ldap/include
-I/home/joem/php/libmcal -I/usr/local/include
-I/home/joem/php/mysql/include/mysql -I/usr/include/ucd-snmp
-I/home/joem/php/php4-STABLE-200302102230/ext/xml/expat -DLINUX=22
-DUSE_HSREGEX -DUSE_EXPAT
-I/home/joem/php/php4-STABLE-200302102230/TSRM -g -Wall -c
/home/joem/php/php4-STABLE-200302102230/sapi/apache/mod_php4.c  -fPIC
-DPIC -o sapi/apache/mod_php4.lo
/home/joem/php/php4-STABLE-200302102230/sapi/apache/mod_php4.c: In
function `sapi_apache_get_fd':
/home/joem/php/php4-STABLE-200302102230/sapi/apache/mod_php4.c:354:
structure has no member named `fd'
make: *** [sapi/apache/mod_php4.lo] Error 1

------------------------------------------------------------------------

[2003-02-10 18:17:58] [EMAIL PROTECTED]

Sorry for the delay, I was building php4.3.0 and monkeying with my
script for a bit.  A simplified:

function download_product ($product, $platform, $userdn) {

  $fp = fopen("/home/joem/public_html/php/wordlist.txt","r");
  fpassthru($fp);
}

exhibits the same problem.

But

<?php
  echo "<HTML><BODY><PRE>\n";
  $fp = fopen("somelargetextfile.txt","r");
  fpassthru($fp);
  echo "</PRE></BODY></HTML>\n";
?>

by itself starts printing the file to my browser fine...  I've still
got the fpassthru() running in the immediately above code running on
another box at the moment.

-rw-rw-r--    1 joem     joem         6.8M Feb 10 16:42
/home/joem/public_html/php/wordlist.txt

------------------------------------------------------------------------

[2003-02-10 18:04:36] [EMAIL PROTECTED]

Still waiting for that feedback though...

------------------------------------------------------------------------

[2003-02-10 18:04:28] [EMAIL PROTECTED]

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



------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/22154

-- 
Edit this bug report at http://bugs.php.net/?id=22154&edit=1

Reply via email to