New Host Setup

I've recently moved my main production server from Suse LAMP running PHP 5.16  to Fedora Core 6 with PHP 5.2.1 and wanted to see if anyone has had any problems?

For example, I can load up the demo application and some of my own work but noticed errors in Apaches error log. 
Specifically,

PHP Warning:  Call-time pass-by-reference has been deprecated;  If you would like to pass it by reference, modify the declaration of [runtime function name]().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file.   in .../public_html/demo/openbiz/bin/BizForm.php on line 1108, referer: http://mycamp.net/demo/office/bin/controller.php?view=people.ViewCamperP...

This first one was easy enough, I just set allow_call_time_pass_reference = On in my php.ini

[Sat Feb 17 18:27:59 2007] [error] [client 68.114.28.223] PHP Fatal error:  Call to a member function GetObjectFactory() on a non-object in /home/gte451f/domains/mycamp.net/public_html/demo/openbiz/bin/SessionContext.php on line 124, referer: http://mycamp.net/demo/office/bin/controller.php?view=people.ViewCamperP...

This next one has me stumped.  The relevant code is...
       if ($this->m_SessObjFileName == null)
         return;
       global $g_BizSystem;
       // loop all objects (bizview, bizform, bizdataobj) collect their session vars
       $allobjs = $g_BizSystem->GetObjectFactory()->GetAllObjects();  //<-Line 124

This same version works fine on my local development environment (WAMP 5.1.6).
So is $g_BizSystem not an object?  What could cause that on my brand spanking new 5.2.1 install?

Jim

Reproduce the warning and fatal error in dempapp?

How to reproduce the warning and fatal error in dempapp (I didn't see such warning and error in my Openbiz 2.2 demoapp XP+PHP5.14)? We should dig out the root cause and fix it.

The problem exists on WAMP

The problem exists on WAMP or LAMP stack usng PHP 5.2 or greater. For me, I installed WAMP Server 1.7 (wampserver.com) which included the latest version of PHP 5.2.1. Installed on fresh machine and I get the following error at /demoapp/bin/login.php

Fatal error: Call to a member function GetObjectFactory() on a non-object in C:\wamp\www\openbiz\bin\SessionContext.php on line 124

You can login successfully but you run into this error in the apache log file when execting and RPC call (ie. navigate records).

From what I understand it has someting to do with the bug report posted on PHP.net listed above.

A quick workaround for PHP5.2x

I agree that the Fatal error is caused by bug #39381. Here's a quick workaround to avoid the error.
In BizSystem.php, at the top add:

// register __destruct method as shutdown function
register_shutdown_function("bizsystem_shutdown");

function bizsystem_shutdown()
{
   global $g_BizSystem;
   $g_BizSystem->GetSessionContext()->SaveSessionObjects();;
}

And comments out $this->m_SessionContext->SaveSessionObjects(); in BizSystem::__destruct().

It works for my WinXP+PHP5.21

I can try to reproduce on my end

I was working with an older version of OpenBiz but I can try in on a different machine with the latest version for CVS.  I'll put that together and post back.

Problem with new PHP version

I've updated my local WAMP copy from 5.1.6 to 5.2.1 and also run into the same problem.  I'll check on the release notes and see if anything sticks out.
....
It seems that starting with the 5.2.x series, the developers did something funky with the way
http://bugs.php.net/bug.php?id=39381

Something about the order in which classes are de-constructed?

For the time being, I'm rolling back to 5.1.6