#22154 [Fbk->Opn]: fpassthru() fails with files larger than a few hundered KB
ID: 22154 User updated by: malekjo at aphrodite dot com Reported By: malekjo at aphrodite dot com -Status: Feedback +Status: Open Bug Type: Apache related Operating System: Linux 2.4.18-10 PHP Version: 4.3.0 New Comment: session.use_trans_sid = 1 Previous Comments: [2003-02-26 19:48:20] [EMAIL PROTECTED] Do you have session.use_trans_sid option enabled in your php.ini? [2003-02-26 13:20:23] malekjo at aphrodite dot com In php.ini: zlib.output_compression = Off memory_limit = 8M output_handler = I get the errors with any 'modern' graphical browser (Mozilla, Netscape, IE...). Links works just fine though. I'm now leaning towards something wrong between fpassthru() and session_start(). Also, in my apache logs I'm getting something similar to: [Tue Feb 25 15:35:06 2003] [info] [client XXX.XXX.XXX.XXX] (104)Connection reset by peer: client stopped connection before rwrite every time a download fails. And its not my users hitting the stop button. [2003-02-20 08:13:55] [EMAIL PROTECTED] No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. [2003-02-11 20:30:59] [EMAIL PROTECTED] Hmm...do you have zlib.output_compression=On ? Or output_handler=ob_gzhandler ?? (in your php.ini) What is your memory_limit setting in php.ini? And does the bug occur with any browser..? [2003-02-11 15:55:38] malekjo at aphrodite dot com even with the simple fpassthru() to load content into the browser window? Doesn't work either. 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
#22154 [Fbk->Opn]: fpassthru() fails with files larger than a few hundered KB
ID: 22154 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: Apache related Operating System: Linux 2.4.18-10 PHP Version: 4.3.0 New Comment: even with the simple fpassthru() to load content into the browser window? Doesn't work either. Previous Comments: [2003-02-11 15:43:15] [EMAIL PROTECTED] I think I've had same problem myself too. I got it solved by sending the content-length header with the size of the file to be downloaded.. [2003-02-11 13:06:53] [EMAIL PROTECTED] Interesting...at least my test case script sometimes responds now. Not often though. Here's a trace: GET /php/test2.php HTTP/1.1 Host: User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i586; U;) Gecko/0 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1 Accept-Language: en Accept-Encoding: gzip, deflate, compress;q=0.9 Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66 Keep-Alive: 300 Connection: keep-alive HTTP/1.1 200 OK Date: Tue, 11 Feb 2003 19:50:35 GMT Server: IBM_HTTP_SERVER/1.3.19.2 Apache/1.3.20 (Unix) PHP/4.3.1-dev X-Powered-By: PHP/4.3.1-dev Set-Cookie: PHPSESSID=7691fe3e49b7a476fca1e0f32bc6f33e; expires=Tue, 11-Feb-03 20:00:35 GMT; path=/; domain=.. Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 0 [2003-02-11 11:30:50] [EMAIL PROTECTED] I just finished building the PHP Stable 200302111630 snapshot for IBM HTTP Server, it built successfully. Thanks! Moving on to trying out my scripts again... [2003-02-11 10:57:07] [EMAIL PROTECTED] As I said, downloads work up to about 1MB with the sessions. Larger than that, they fail. Even so, using headers, as long as I generate all my headers before displaying anything it should all work. [2003-02-11 09:54:17] [EMAIL PROTECTED] When you use sessions, some http headers are sent..maybe those are the ones causing the downloads to fail? 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
#22154 [Fbk->Opn]: fpassthru() fails with files larger than a few hundered KB
ID: 22154 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: Apache related Operating System: Linux 2.4.18-10 PHP Version: 4.3.0 New Comment: As I said, downloads work up to about 1MB with the sessions. Larger than that, they fail. Even so, using headers, as long as I generate all my headers before displaying anything it should all work. Previous Comments: [2003-02-11 09:54:17] [EMAIL PROTECTED] When you use sessions, some http headers are sent..maybe those are the ones causing the downloads to fail? [2003-02-10 22:47:33] [EMAIL PROTECTED] The compatibility issue with the IBM HTTP Server has been resolved. Appropiate solutions are available as part of all main branches. [2003-02-10 22:33:28] [EMAIL PROTECTED] Try this: The reproducable error that fails for me no matter what. [2003-02-10 22:11:57] [EMAIL PROTECTED] 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(). [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. 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
#22154 [Fbk->Opn]: fpassthru() fails with files larger than a few hundered KB
ID: 22154 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: Apache related Operating System: Linux 2.4.18-10 PHP Version: 4.3.0 New Comment: 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 \n"; $fp = fopen("somelargetextfile.txt","r"); fpassthru($fp); echo "\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 Previous Comments: [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 [2003-02-10 18:03:00] [EMAIL PROTECTED] I was able to reproduce this behavior with PHP 4.3.0 as an apache module. (just finished building and installing it). [2003-02-10 17:58:28] [EMAIL PROTECTED] Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. PHP 4.3.0 was released long time ago.. [2003-02-10 17:29:14] [EMAIL PROTECTED] Does using readfile("../../../software/$file") produce the same problems? Can you reproduce the problems using a simpler script? i.e.: \n"; $fp = fopen("somelargetextfile.txt","r"); fpassthru($fp); echo "\n"; ?> 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