Hi Geoff

Something about how PHP handles global variables has changed in 5.2.8.

For some reason syntax like this does not work anymore:

$db_api =& new DB_API;

So if you open fez/include/db_access.php and change that line to this it works:

$db_api = new DB_API;
$GLOBALS['db_api'] = $db_api;

I’ve tried hard to research what might have caused this change but I havent found anything yet. Seems odd. Eventum (which is what a lot of fez reuses code from still uses the old way but I havent seen anyone complain in their mailing lists yet.

Anyway this is a good workaround for now, and if it proves fine it’ll be in 2.1 RC3 as well.


On 22/01/09 10:50 AM, "Christiaan Kortekaas" <c.kortekaas@library.uq.edu.au> wrote:

Thanks Geoff

I think Lachlan is going to look at this by installing 5.2.8 on his Win XP Fez. Nothing else obvious springs to my mind.


On 22/01/09 10:47 AM, "Geoffrey Cleave" <geoffrey.cleave@deakin.edu.au> wrote:

Hi Christiaan,
There is nothing in error_handler.log. The message is logged in the apache error log, but there is no further information in there.
I had register_globals = Off in php.ini  for both 5.2.6 and 5.2.8
With register_globals = On  the error still occurs with 5.2.8  (and no error with 5.2.6)

From: Christiaan Kortekaas [mailto:c.kortekaas@library.uq.edu.au]
Sent: Thursday, 22 January 2009 11:13 AM
To: fez-users@lists.sourceforge.net
Subject: Re: [Fez-users] PHP problem with Fez

Hi Geoff

Is there anything else related in your error_handler.log?

Is your php.ini variable ‘register_globals’ = On in each different version? Or is the php.ini the same in both?

I’m pretty sure we still need register_globals = On but perhaps php5.2.8 sets it to off by default these days.


On 22/01/09 9:35 AM, "Geoffrey Cleave" <geoffrey.cleave@deakin.edu.au> wrote:
While trying  a fresh install of Fez2.1RC2  I had  PHP5.2.8 installed (using Windows XP)
I get the following error
Fatal error: Call to a member function escapeSimple() on a non-object
In class.misc.php on line 842
When I use PHP5.2.6 there is no problem.
Geoff Cleave - Information Systems Coordinator
Deakin University Geelong Victoria 3217 Australia.
Phone: 03 5227 78103  Fax:   03 5227 8000
E-mail: geoffrey.cleave@deakin.edu.au <mailto:geoffrey.cleave@deakin.edu.au>
Website: http://www.deakin.edu.au
<http://www.deakin.edu.au/> Deakin University CRICOS Provider Code: 00113B (Vic)

Important Notice: The contents of this email are intended solely for the named addressee and are confidential; any unauthorised use, reproduction or storage of the contents is expressly prohibited. If you have received this email in error, please delete it and any attachments immediately and advise the sender by return email or telephone.
Deakin University does not warrant that this email and any attachments are error or virus free.

This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.

Fez-users mailing list

Christiaan Kortekaas
Senior Library Open Sorcerer
Library Technology Service
The University of Queensland, Australia QLD 4072
Telephone : (+61) (7) 3346 4337