Binary data in session

From: Date: Mon, 09 May 2005 21:48:22 +0000
Subject: Binary data in session
Groups: php.internals 
Request: Send a blank email to internals+get-16187@lists.php.net to get a copy of this message
I have been developing a site which stores an image files binary data inside a session variable. Initially, I was developing this site on the following environment: Apache-2.0.52/PHP5.0.3/Windows XP Things worked very well, as I expected them to anyway. I would upload images and they would be manipulated and stored back into the session. I then moved over to my production box: Apache-2.0.54/PHP5.0.4/FreeBSD And everything literally stopped dead in it's track with regards to the session variables and the binary data. Whenever I now upload an image, it is properly stored in session. However, whenever I do session_start(); on any page, it just hangs. In fact, here is the test.php file on which it hung: <?PHP session_start(); ?> Hi // Never gets outputted to browser I've yet to come across other users with this same problem. Furthermore, upon suggestions of co-workers, I have tried to base64 encode before it is serialized by PHP and base64 decode this data when I need to use it. Looking through my /var/tmp directory, I see that in fact the session file is 300KB, which makes sense, since the image I was trying to upload was indeed roughly 300KB. Regards PS, also check out my MySQLi group @ http://groups-beta.google.com/group/MySQLi if ever in need of help with that part of the PHP world :-)

« previous php.internals (#16187) next »