Bug 4775 - Possible PHP 5.3 problems
Possible PHP 5.3 problems
Status: RESOLVED FIXED
Product: OCS
Classification: Unclassified
Component: General
2.1.3
PC Mac OS X 10.3
: P5 normal
Assigned To: Alec Smecher
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-28 11:31 PDT by James MacGregor
Modified: 2010-06-17 09:03 PDT (History)
2 users (show)

See Also:
Version Reported In:
Also Affects:


Attachments
Patch against OJS 2.2.3 (1.54 KB, patch)
2009-10-07 12:22 PDT, Alec Smecher
Details | Diff
Patch against OCS 2.1.2 (503 bytes, patch)
2009-10-07 12:24 PDT, Alec Smecher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James MacGregor 2009-09-28 11:31:03 PDT
I'm encountering some weird problems, I think due to PHP 5.3. This concerns both ojs2- and ocs2-stable. I upgraded to OS X 10.6 a week ago, which includes PHP 5.3, and I'm getting a bunch of errors (see below). I've tried clearing the cache as per http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=4880, but no luck. I've talked to Matt briefly about possible PHP 5.3 issues in the -stable lines, and that they are possibly the same problems as reported against the -devel lines (Bug 4738). Any thoughts?

errors at head of ocs2-stable install: 

Deprecated: Assigning the return value of new by reference is deprecated in /Users/jmacgreg/cvs/ocs2-stable/classes/cache/CacheManager.inc.php on line 25 Deprecated: Assigning the return value of new by reference is deprecated in /Users/jmacgreg/cvs/ocs2-stable/classes/cache/CacheManager.inc.php on line 32 Deprecated: Assigning the return value of new by reference is deprecated in /Users/jmacgreg/cvs/ocs2-stable/classes/cache/CacheManager.inc.php on line 44 Deprecated: Assigning the return value of new by reference is deprecated in /Users/jmacgreg/cvs/ocs2-stable/classes/cache/CacheManager.inc.php on line 56 Deprecated: Assigning the return value of new by reference is deprecated in /Users/jmacgreg/cvs/ocs2-stable/classes/cache/GenericCache.inc.php on line 54 Deprecated: Function set_magic_quotes_runtime() is deprecated in /Users/jmacgreg/cvs/ocs2-stable/classes/xml/XMLParser.inc.php on line 38 Deprecated: Assigning the return value of new by reference is deprecated in /Users/jmacgreg/cvs/ocs2-stable/classes/file/FileWrapper.inc.php on line 109 Deprecated: Assigning the return value of new by reference is deprecated in /Users/jmacgreg/cvs/ocs2-stable/classes/file/FileWrapper.inc.php on line 113 Deprecated: Assigning the return value of new by reference is deprecated in /Users/jmacgreg/cvs/ocs2-stable/classes/file/FileWrapper.inc.php on line 117 Deprecated: Assigning the return value of new by reference is deprecated in /Users/jmacgreg/cvs/ocs2-stable/classes/file/FileWrapper.inc.php on line 121 Deprecated: Assigning the return value of new by reference is deprecated in /Users/jmacgreg/cvs/ocs2-stable/classes/file/FileWrapper.inc.php on line 124 Deprecated: Function set_magic_quotes_runtime() is deprecated in /Users/jmacgreg/cvs/ocs2-stable/classes/xml/XMLParser.inc.php on line 166 Deprecated: Function set_magic_quotes_runtime() is deprecated in /Users/jmacgreg/cvs/ocs2-stable/classes/xml/XMLParser.inc.php on line 38 Deprecated: Function set_magic_quotes_runtime() is deprecated in /Users/jmacgreg/cvs/ocs2-stable/classes/xml/XMLParser.inc.php on line 166 Warning: get_class() expects parameter 1 to be object, string given in /Users/jmacgreg/cvs/ocs2-stable/classes/cache/GenericCache.inc.php on line 62 Warning: get_class() expects parameter 1 to be object, string given in /Users/jmacgreg/cvs/ocs2-stable/classes/cache/GenericCache.inc.php on line 62 Warning: get_class() expects parameter 1 to be object, string given in /Users/jmacgreg/cvs/ocs2-stable/classes/cache/GenericCache.inc.php on line 62 Deprecated: Function set_magic_quotes_runtime() is deprecated in /Users/jmacgreg/cvs/ocs2-stable/classes/xml/XMLParser.inc.php on line 38 Deprecated: Function set_magic_quotes_runtime() is deprecated in /Users/jmacgreg/cvs/ocs2-stable/classes/xml/XMLParser.inc.php on line 166 Warning: get_class() expects parameter 1 to be object, string given in /Users/jmacgreg/cvs/ocs2-stable/classes/cache/GenericCache.inc.php on line 62
Comment 1 James MacGregor 2009-10-05 09:38:05 PDT
A few more notes: 

-- the errors I listed previously only showed up on the install page; the install page itself looked crazy, with a whole bunch of translation keys replaced by errors. I could still furnish everything needed for the install, however; an automatic install worked fine, and I don't see those errors any more. 

-- However, I will also note that my sidebar is no longer showing up (admin and conference level)0, even though I've checked in Conference Setup and blocks are assigned to it. Again, this was mentioned by bar338 in the forum thread I linked to. And again I'll note that I've cleared the caches. 

-- This is also an issue with OJS.
Comment 2 James MacGregor 2009-10-05 10:58:40 PDT
Looking at the error log also throws up the following error: 

[Mon Oct 05 09:37:28 2009] [error] [client 127.0.0.1] PHP Warning:  Parameter 2 to BlockPlugin::callback() expected to be a reference, value given in /Users/jmacgreg/cvs/ojs2-stable/classes/plugins/HookRegistry.inc.php on line 79. 

Users are reporting problems related to PHP 5.3 and hookRegistry: http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=4999&p=19669#p19669. Could this be the same issue?
Comment 3 Alec Smecher 2009-10-07 12:22:46 PDT
Created attachment 2507 [details]
Patch against OJS 2.2.3

Corrects reference problems leading to e.g. missing sidebar blocks. As for the warning messages, those should be redirected to a log file and ignored -- there's a custom error handler that will be included with OJS 2.3, but that probably won't be back-ported.
Comment 4 Alec Smecher 2009-10-07 12:24:56 PDT
Created attachment 2508 [details]
Patch against OCS 2.1.2
Comment 5 Alec Smecher 2009-10-07 12:25:22 PDT
Fixed.
Comment 6 olaf 2010-06-17 09:03:58 PDT
I experienced the same error with the current OJS 2.2.4 version on Mac with Mac OS X 10.6.3 installed.

I use the MAMP Distribution 1.9 (Apache 2.0.63, MySQL 5.1.44, PHP 5.3.2) for more details on the distribution see www.mamp.info 

I had a lot of errors like
"Warning: get_class() expects parameter 1 to be object..." in the OJS installation screen while trying to install a test-installation.

I ignored the warnings and filled out the screen fields - it worked fine, at least I got a "installation succesfull" screen and can log in as websiteadministrator. And after installation the site is shown without the anoying error-messages.

So it seems there is need for another patch for OJS 2.2.4 and to all users who experienced the same problem: just go on in the installation process - it works!

salut
olaf