|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-07-18 04:40 UTC] g dot hort at unsw dot edu dot au
If you go to ftest.html (see below) and upload a file of reasonably large size (80k) then click view to go to ftest.php (see below) the variable $_SESSION['fdata'] is undefined and you get the message "data lost" if using mysql to store sessions. If using files to store sessions or the uploaded file is small it works. This happens on redhat 7.2 with apache 1.3.22, mysql 3.23.41 & php-4.1.2-0horde1 & php-mysql-4.1.20-horde1 from the horde web site (www.horde.org). I used the php.ini & httpd.conf that gets installed as standard except for the config below. I've also seen this happen on Solaris 8, apache 1.3.26, php-4.2.1 and both mysql and sybase-ct. It shows up when importing csv address book files into IMP/turba. Unfortunately it's intermittent on linux :-( my session handler is http://sporty.nun.unsw.edu.au/pear_session2.phps apache config: <Directory "/var/www/html/ftest"> Options Indexes FollowSymLinks AllowOverride All order allow,deny allow from all php_flag register_globals Off php_value session.save_handler user php_value session.auto_start 0 php_value session.use_cookies 1 php_value session.use_trans_sid 0 php_value session.gc_maxlifetime 2200 php_value session.cache_limiter nocache php_value session.save_path mysql://horde:horde@localhost/test php_value auto_prepend_file /usr/share/php/pear_session2.php </Directory> ftest.html: <html> <head><title>Session Test Initial</title></head> <body> <form enctype="multipart/form-data" action="ftest.php" method="post"> <input type="hidden" name="MAX_FILE_SIZE" value="5000000"> Send this file: <input name="userfile" type="file"> <input type="submit" value="Send File"> </form> </body> </html> ftest.php: <?php session_start(); echo "<html>\nsession ID is ".session_id()."<br />\n"; if (isset($_FILES['userfile'])) { echo "file name is ".$_FILES['userfile']['name']."<br />\n"; echo "file name is ".$_FILES['userfile']['tmp_name']."<br />\n"; echo "file type is ".$_FILES['userfile']['type']."<br />\n"; echo "file size is ".$_FILES['userfile']['size']."<br />\n"; $importData = file($_FILES['userfile']['tmp_name']); $_SESSION['md5'] = md5(serialize($importData)); $_SESSION['fdata'] = $importData; echo "md5 is ".$_SESSION['md5']."<br />\n"; echo "<a href=\"".$_SERVER['PHP_SELF']."\">View</a><br />\n"; } else { if (isset($_SESSION['fdata'])) { echo "session md5 is ".$_SESSION['md5']."<br />\n"; echo "saved file md5 is ".md5(serialize($_SESSION['fdata']))."<br />\n"; } else { echo "data lost<br />\n"; } echo "<a href=\"ftest.html\">Another</a><br />\n"; } ?> </html> PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
I tried the latest snapshot on Solaris 8 with gcc 2.95.3 and the sun linker and got several "output line too long" errors and the link failed. I tried the latest stable snapshot; that compiled and linked fine but didn't fix the problem. my config is: #!/bin/sh CC=gcc \ ./configure \ --with-apxs=/usr/local/httpd/bin/apxs \ --with-gettext \ --with-xml \ --with-zlib \ --with-mysql=/usr/local/mysql \ --with-sybase-ct=/usr/local/sybase12.5/OCS-12_5 \ --with-imap=../imap-2001a output of make is at http://sporty.nun.unsw.edu.au/gkh/make.out