ID: 17419 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Feedback Bug Type: Session related Operating System: Apache PHP Version: 4.2.1 New Comment:
I am developing on a web server to which I do not normally have telnet privileges, but I will ask them if they can open this up to me. I apologize for putting Apache rather than the OS. I'll get that for you as soon as I can -- it is BSD something. Thank you for looking at this! Wyckham Previous Comments: ------------------------------------------------------------------------ [2002-05-25 04:41:22] [EMAIL PROTECTED] Can you gice us some real error message instead of the junk you're browser is giving you? Can you try to telnet'ing manually to your webserver and give us the HTTP response? Also, Apache is not an OS. Please update the field above. ------------------------------------------------------------------------ [2002-05-24 16:47:42] [EMAIL PROTECTED] Complex objects are not correctly stored in a session. This report is similar to 8676, which was reported fixed. It now appears to be broken in 4.2.1. Here is a code scriplet to demonstrate the problem: <? class Alpha { var $alpha1; var $betavar; function Alpha() { $this->betavar =& new Beta(&$this); //Let Beta use Alpha's methods and properties $this->alpha1 = 22; } function getvar() { return $this->alpha1; } } class Beta { var $beta1; var $alphacall; function Beta(&$par) { $this->alphacall = &$par; //alphacall will let Beta use Alpha's methods and properties $this->beta1 = 5; } function getalphavar() { print("<br>The value of the alphavar from within Beta is: " . $this->alphacall->alpha1 ); } } session_start(); if (! session_is_registered("pm") ) { session_register("pm"); // register and instantiate the variable $pm =& new Alpha(); } print("<br>The vaue of alpha1 is: " . $pm->getvar() ); print("<br>The value of beta1 is: " . $pm->betavar->beta1); print("<br>" . $pm->betavar->getalphavar() ); ?> OBSERVED BEHAVIOR: When this page is loaded the first time, everything works as expected, and the values of alpha1, and beta 1 print out just fine. However, attempts to refresh the page yield a browser error message "This page cannot be displayed". This structure worked (flakily) on 4.04pi1, and I was hoping that the fix of 8676 would have made it solid in 4.2.1. However, the situation is now worse--the above structure NEVER works. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17419&edit=1