#22154 [Ver->Csd]: fpassthru() fails with files larger than a few hundered KB

From: Date: Thu, 31 Jul 2003 19:48:16 +0000
Subject: #22154 [Ver->Csd]: fpassthru() fails with files larger than a few hundered KB
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-45138@lists.php.net to get a copy of this message
 ID:               22154
 Updated by:       iliaa@php.net
 Reported By:      malekjo at aphrodite dot com
-Status:           Verified
+Status:           Closed
 Bug Type:         Session related
 Operating System: Linux 2.4.18-10
 PHP Version:      4.3.2
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




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

[2003-07-30 17:16:39] sniper@php.net

But it still can not crash. Reopened.


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

[2003-07-30 13:50:26] iliaa@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php

What's happening is very simple, you have a memory limit setting which
prevents the script from completing the execution because it attempts
to allocate more memory then it is allowed.
When this happens PHP will either terminate with E_ERROR or exit(1)
printing the error message to stderr. The latter message you may be
able to find inside your Apache's main error log.

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

[2003-03-06 12:50:12] sniper@php.net

I get pretty wierd results with this script:

<?php

session_start();  // Comment this and it works fine..

$fp = fopen("test.zip", 'rb');
rewind($fp);
header("Cache-control: private"); // another fix for IE
header("Content-Type: application/x-stuffit");
header("Content-Length: ".filesize('test.zip'));
header("Content-Disposition: attachment\; filename=\"test.zip\"");
header("Connection: close");
$fr = fpassthru($fp);

?>

php,ini:
session.use_trans_sid = 1
memory_limit = 1M

And sending some file around 1M size will make it fail..









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

[2003-02-27 00:43:22] malekjo at aphrodite dot com

session.use_trans_sid = 1

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

[2003-02-26 19:48:20] iliaa@php.net

Do you have session.use_trans_sid option enabled in your php.ini?

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

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



Thread (34 messages)

« previous php.bugs (#45138) next »