ID: 20449 Comment by: matthew at e-businesscoach dot com Reported By: josh at zebotech dot com Status: No Feedback Bug Type: Session related Operating System: redhat 7.3 PHP Version: 4.3.0-dev New Comment:
I am experiencing what I believe to be the same issue in PHP 4.3.2. Here is my system: Linux 2.4.20-6 #1 i686 Apache/1.3.27 (Unix) PHP/4.3.2 mod_ssl/2.8.14 OpenSSL/0.9.7b PHP configured as an apache shared module via APXS: ./configure --with-mysql=/home/mysql --with-apxs=/www/bin/apxs --enable-track-vars --enable-ftp --enable-exif --with-gd --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-zlib-dir=/usr/lib --with-imap=/usr/lib --with-kerberos --with-imap-ssl Basically I am saving the contents of a shopping cart as a multidimensional associative array inside an object which is stored as a session variable, i.e: class User { // -- snip -- var $cart = Array(); // -- snip -- // constructor function function User ($uid, $password) { // -- snip -- // lookup some data in db and populate member vars... } } $ses_cust =& new User(...); $ses_cust->cart[$productid][$optionid]["qty"] = $qty; $ses_cust->cart[$productid][$optionid]["price"] = $qty; session_register("ses_cust"); etc. etc. Most of the time there are no problems, but in an unpredictable manner sometimes in the session data the $cart array ends up null. It has definitely not been reset within any of the code. When the error occurs, only the $cart array is lost, without the session being lost or other non-array member data being lost. It does not even end up as an empty array but totally nulled out. The serialized data looks like this: s:4:"cart";N instead of s:4:"cart";a:0:{} It was indicated in this thread that this issue was fixed in PHP 4.3.2, but no other details were given. Could someone elaborate on what was the problem and what was fixed, and do you consider this bug completely solved? Thank you very much for all the time you invest in PHP, it does not go unappreciated, and if there is any more data I can provide I will do my best to do so. Regards, Matthew Kauffman Previous Comments: ------------------------------------------------------------------------ [2003-06-19 19:50:31] sansoy at gsn dot com We just started having random session errors when we compiled with --xmlrpc. We're running PHP 4.3.0 and APACHE 1.3.27 . The specific error we were seeing is Fatal error: session_start()[function.session-start}: Failed to initialize session module in /home/www/test.php on line 2 After recompiling without --xmlrpc the random session error disappeared. ------------------------------------------------------------------------ [2003-06-10 07:22:36] phpbugs at virtua dot ch We are still having the same issue here with php-4.3.3 ... Currently testing latest snapshots. Config : FreeBSD 4.7 UP, Apache 1.3.27, standard /tmp session handling. One of our developers even tried a print_r($_SESSION) and found part of the php source file in it !!!!!! There seem to be some leakage somewhere !!!!! ------------------------------------------------------------------------ [2003-06-09 08:44:10] [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-06-02 17:09:32] [EMAIL PROTECTED] This should be fixed in PHP 4.3.2, so please give it a try. ------------------------------------------------------------------------ [2003-06-02 14:44:35] radek at pinkbike dot com I also have seen behaviour of missing session data. I have detected this in the custom shopping cart I have written. Every 20 or 30 orders we get a "blank" order. This blank order is a result of the session cart is not picked up on the last stage of the purchase process. I went through my code a million times to try to figure out how I could of caused this but reading this bug report I starting to think it maybe a result of php session/serialization. Like the other person with the shopping cart stated, who knows how many users don't even make it to the last step and their cart disappears. I store associative arrays in the session I run on a dual CPU intel box The site is relatively high load - 3 million hits a day I have not been able to reproduce the problem myself It has been happening regularly since January when i put up the software - it happens on a few versions of php since Jan 2003 What are options here? Any documentation, warnings about what not to store in php sessions? Should I be writting my own handler/serializer? here are the box details Apache/1.3.26 PHP Version 4.3.1 System Linux superlight 2.4.20-xfs #2 SMP Mon Apr 7 21:06:32 CDT 2003 i686 Build Date May 1 2003 00:21:10 Configure Command './configure' '--with-apxs=/usr/bin/apxs' '--with-mysql=/usr/local/mysql' '--with-openssl' '--with-zlib' '--with-mcrypt' '--enable-shmop' '--enable-sysvshm' '--enable-sysvsem' '--enable-mbstring' '--with-gd' '--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--enable-mbstring' '--with-curl=/usr/local' '--enable-exif' Server API Apache Virtual Directory Support disabled Configuration File (php.ini) Path /usr/local/lib/php.ini PHP API 20020918 PHP Extension 20020429 Zend Extension 20021010 Debug Build no Thread Safety disabled Registered PHP Streams php, http, ftp, https, ftps, compress.zlib ------------------------------------------------------------------------ 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/20449 -- Edit this bug report at http://bugs.php.net/?id=20449&edit=1