Updated!: I have added a demo of svn running on php 5.0.5, php5.demo.ezcommunity.net
We are looking for several other users and developers in the eZ publish 2 community to sponsor the development, documentation and release of php4.4 -> php5.1 improvements to eZ publish 2.3. Contact Brookins Consulting for more information.

Backstory

I was working on some server administration this weekend (very hush hush mumbojumbo :D).

I started thinking about using eZ publish 2 on versions of PHP greater than 4.3.9, say like 4.4.x or even php 5.0.x

I have been meaning to checkout eZ publish 2.3 (svn) and do a little more work to the community build in svn, review extra modules in svn as contributions, give a little more back to the community. (Is anyone even listening or care anymore :?) No matter I do what I do and so will you.

Results of testing at first glance (php5) ..

  • As normal with eZ publish 2 (on newer versions of php 4). eZ publish 2 generates a lot of php `warnings` in the httpd error log file.
  • It seems that many of the index page errors (running under php5) are of a more serious nature than normal php4 warnings

Seems that several new kinds of `warnings`, `notices` and `fatal errors`.
1) PHP Notice: Trying to get property of non-object
2) PHP Warning: Call-time pass-by-reference has been deprecated – argument passed by value;
3) PHP Fatal error: Cannot redeclare eZOnline::$OnlineTypeID
4) PHP Notice: Undefined variable: (most common)
5) PHP Warning: Invalid argument supplied for foreach() (second most common)

It seems that the core of eZ publish 2 has a number of places in the software code which are dependant on depricated PHP features, functionality, syntax, etc.

On further inspection it seems that several of the modules also carry the same problems.

  1. ezsession, ezuser, eztrade, core classes use of GLOBALS instead of namespaces
  2. non- object property access
  3. Call-time pass-by-reference has been deprecated
  4. Class redeclare of class variables
  5. Class use of restricted (reserved) php words as class methods, like …. clone, private, ….(unsure of this one exactly but it generates fatal errors). Updated: Seems I have the right idea as others say similar things+(doc1|doc2|docX).

Files using or calling reserved names:
eztrade/classes/ezproductcategory.php
ezforum/classes/ezforummessage.php
ezforum/classes/ezforum.php

Files with redeclare errors:
ezaddress/classes/ezonline.php
ezad/classes/ezad.php

Files with other errors:
classes/ezfile.php

Most Affected Files:
– ezfile
– eztrade
– ezarticle
– classes

Example Errors (3rd Run + Minor Changes)
[Sun Dec 11 17:04:29 2005] [error] [client 66.169.180.221] PHP Notice: Trying to get property of non-object in /var/www/php5.demo.ezcommunity.net/trunk/classes/ezfile.php on line 361
[Sun Dec 11 17:04:29 2005] [error] [client 66.169.180.221] PHP Notice: Trying to get property of non-object in /var/www/php5.demo.ezcommunity.net/trunk/classes/ezfile.php on line 260
[Sun Dec 11 17:04:29 2005] [error] [client 66.169.180.221] PHP Notice: Trying to get property of non-object in /var/www/php5.demo.ezcommunity.net/trunk/classes/ezfile.php on line 260
[Sun Dec 11 17:04:29 2005] [error] [client 66.169.180.221] PHP Notice: Trying to get property of non-object in /var/www/php5.demo.ezcommunity.net/trunk/classes/ezfile.php on line 260
[Sun Dec 11 17:04:29 2005] [error] [client 66.169.180.221] PHP Notice: Trying to get property of non-object in /var/www/php5.demo.ezcommunity.net/trunk/classes/ezfile.php on line 260
[Sun Dec 11 17:04:29 2005] [error] [client 66.169.180.221] PHP Notice: Trying to get property of non-object in /var/www/php5.demo.ezcommunity.net/trunk/classes/ezfile.php on line 242
[Sun Dec 11 17:04:29 2005] [error] [client 66.169.180.221] PHP Notice: Trying to get property of non-object in /var/www/php5.demo.ezcommunity.net/trunk/classes/ezfile.php on line 242
[Sun Dec 11 17:04:29 2005] [error] [client 66.169.180.221] PHP Notice: Trying to get property of non-object in /var/www/php5.demo.ezcommunity.net/trunk/classes/ezfile.php on line 242
[Sun Dec 11 17:04:30 2005] [error] [client 66.169.180.221] PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; 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. However, future versions may not support this any longer. in /var/www/php5.demo.ezcommunity.net/trunk/eztrade/classes/ezvoucherinformation.php on line 176
[Sun Dec 11 17:04:30 2005] [error] [client 66.169.180.221] PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; 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. However, future versions may not support this any longer. in /var/www/php5.demo.ezcommunity.net/trunk/eztrade/classes/ezvoucherused.php on line 153
[Sun Dec 11 17:04:30 2005] [error] [client 66.169.180.221] PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; 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. However, future versions may not support this any longer. in /var/www/php5.demo.ezcommunity.net/trunk/eztrade/classes/ezproductpricerange.php on line 147
[Sun Dec 11 17:04:30 2005] [error] [client 66.169.180.221] PHP Parse error: parse error, unexpected T_CLONE, expecting T_STRING in /var/www/php5.demo.ezcommunity.net/trunk/ezforum/classes/ezforummessage.php on line 257