php sessions problem (fwd)
| From: | Jerry | Date: | Wed, 18 Oct 2000 20:43:57 +0000 |
| Subject: | php sessions problem (fwd) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-20976@lists.php.net to get a copy of this message | ||
Jerry Bonner
Systems Analyst / Web Development
[bonnej@prairie.lakes.com]
---------------------------------
Prairie Lakes Internet
---------- Forwarded message ----------
Date: Wed, 18 Oct 2000 15:43:23 -0500 (CDT)
From: Jerry <bonnej@prairie.lakes.com>
To: php-general@list.php.net
Subject: php sessions problem
ok heres part of the code i have:
if ($method == "view") {
Header("Content-Type: ".mime_type($file_data->file_name));
Header("Content-Disposition: filename=$file_data->file_name");
Header("Content-Length: ".filesize($file_data->path));
}
else {
Header("Content-Type: application/octect-stream" );
Header("Content-Disposition: attachment; filename=$file_data->file_name");
Header("Content-Length: ".filesize($file_data->path));
}
readfile($file_data->path);
now this code works fine, but if i add session_start(); to the beginning
of the script and try to download a file IE will bring up a dialog asking
whether to save the file or open it from the location, i choose save the
file and then it brings up the dialog to name the file, now if i choose
cancel at this point and then retry to download the file, the browser sits
there for about 3 minutes before displaying a page unavailable error, and
any attempt to access pages that have sessions do the same, the only way
to access those pages again is to close the browser completely (including
multiple windows that might be open) and reopen the browser again. What
the hell is going on? btw im using PHP/4.0.1pl2 with Apache/1.3.3 on
Cobalt Linux
Jerry Bonner
Systems Analyst / Web Development
[bonnej@prairie.lakes.com]
---------------------------------
Prairie Lakes Internet