eZ publish 3.x on PHP 5

Author Message

Kristof Coomans

Tuesday 19 September 2006 12:20:48 am

Hello Lukasz, thanks for giving it a try.

I did a test of eZ publish from your package. Some functionality does not work yet, for example it is impossible to remove drafts or content, discarding drafts causes fatal error on my setup ( SUSE Linux 10.1, Apache 2.2.0/PHP 5.1.2 (mod_php), error_reporting=E_STRICT )

Will have a look at that.

lots of errors about mktime()

It is safe to ignore them, but I will replace those with the time() function where necessary.

also references and static methods

The reference errors are there in the official eZ 3.8 too but they are silently discarded. The strict errors about calling non-static methods statically are the most important.

character conversion does not work (Error: Failed to store transformation table )

I temporarely disabled some caches (in the code) because those caches were showed in the browser instead of included as a PHP file. I could not find what's causing this. Look in the code for this string:
<i>// temporarely hide the cache display problem</i>
Most of the time there's a return after that part, if you remove it you'll see the problem again.

cache is not cleared after publish (INI settings are correct).

Will have a look at that too.

The code will be in svn today. I already did a lot of updates since the first version I released here.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Michael Maclean

Tuesday 19 September 2006 1:18:08 am

@Lukasz: Yeah, I worked that out ;)

I've just tried installing it again on my laptop, and the error I get is:

Fatal error: Cannot use string offset as an array in /var/www/ez-php5/kernel/classes/packagehandlers/ezcontentobject/ezcontentobjectpackagehandler.php on line 1133

Then the usual note about eZ publish not finishing its request. This happens just after the last step when it is creating the sites. It does create at least some of the tables in the database before it falls over.

I'm using Apache 2.0.55 with the prefork MPM, PHP 5.1.2 and MySQL 5.0.22 - all the Ubuntu 6.06 default packages. Error reporting is set to not include E_STRICT, though I'm just going to change that and try again. I was trying to use the "Corporate" site package. If you need any more information give me a shout.

eZpedia community documentation project | http://ezpedia.org

Kristof Coomans

Tuesday 19 September 2006 6:38:17 am

I've updated the downloadable package: http://users.telenet.be/coomans/ezpublish_384_php5.tar.gz

- The annoying errors about mktime are solved.
- Content cache gets cleared again on publishing.
- Removing drafts/published objects works again.

... and a lot of other stuff has been fixed.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Ɓukasz Serwatka

Tuesday 19 September 2006 10:17:34 am

@Kristof, this version is much more "stable" ;) Here is what I found with debug redirection enabled. Everything related to content edit/remove/publish, also creation of content classes.

Only variables should be assigned by reference in /srv/www/htdocs/ezp384php5/kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmleditoutput.php on line 94

Non-static method eZDebug::addTimingPoint() should not be called statically in /srv/www/htdocs/ezp384php5/index.php on line 948

Only variables should be assigned by reference in /srv/www/htdocs/ezp384php5/kernel/classes/datatypes/ezxmltext/ezxmlinputparser.php on line 134

Trying to get property of non-object in /srv/www/htdocs/ezp384php5/kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmlinputparser.php on line 454

Trying to get property of non-object in /srv/www/htdocs/ezp384php5/kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmleditoutput.php on line 101

Non-static method eZContentObject::expireTemplateBlockCache() should not be called statically in /srv/www/htdocs/ezp384php5/kernel/classes/ezcontentcachemanager.php on line 567

Non-static method eZPolicyLimitation::findByType() should not be called statically in /srv/www/htdocs/ezp384php5/kernel/classes/ezrole.php on line 391

Non-static method eZPolicyLimitation::findByType() should not be called statically in /srv/www/htdocs/ezp384php5/kernel/classes/ezrole.php on line 418

Non-static method eZContentBrowse::nodeAliasID() should not be called statically in /srv/www/htdocs/ezp384php5/kernel/classes/ezcontentbrowse.php on line 217

Non-static method eZContentBrowse::nodeAliasID() should not be called statically in /srv/www/htdocs/ezp384php5/kernel/classes/ezcontentbrowse.php on line 212

Non-static method eZContentBrowse::browse() should not be called statically in /srv/www/htdocs/ezp384php5/kernel/content/relation_edit.php on line 119

Non-static method eZContentBrowse::result() should not be called statically in /srv/www/htdocs/ezp384php5/kernel/content/relation_edit.php on line 47

Non-static method eZContentObject::expireAllCache() should not be called statically in /srv/www/htdocs/ezp384php5/kernel/classes/ezcontentcachemanager.php on line 775

PHP Strict Standards:  Declaration of eZContentLanguage::remove() should be compatible with that of eZPersistentObject::remove() in /srv/www/htdocs/ezp384php5/kernel/classes/ezcontentlanguage.php on line 34
PHP Strict Standards:  Only variables should be assigned by reference in /srv/www/htdocs/ezp384php5/runcronjobs.php on line 37
PHP Strict Standards:  Only variables should be assigned by reference in /srv/www/htdocs/ezp384php5/runcronjobs.php on line 41

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Kristof Coomans

Friday 22 September 2006 3:36:10 am

@Michael:
I get the same results with the corporate package:

Fatal error: Cannot use string offset as an array in kernel/classes/packagehandlers/ezcontentobject/ezcontentobjectpackagehandler.php on line 1133

Since PHP5, illegal use of string offsets causes E_ERROR instead of E_WARNING (<i>
http://www.php.net/manual/en/migration5.incompatible.php</i>). We should see if we get a warning in the official version of eZ. If we get the warning there, then this is a problem in the official version and not of our port to PHP5.

I'll investigate this further.

Later at the day I will do a new release with some bug fixes and improvements.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Kristof Coomans

Friday 22 September 2006 7:00:03 am

In a few minutes the downloadable package will be updated: http://users.telenet.be/coomans/ezpublish_384_php5.tar.gz

It contains a bunch of fixes and I also added a mysqlidb database plugin and a __autoload function.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Xavier Dutoit

Friday 22 September 2006 7:05:21 am

Hi,

I hope I can give it a proper try this week-end (php5+php4+lighttpd) and let you know. Out of lazyness, any chance to have it on a svn server very soon ?

http://www.sydesy.com

Samuel Sauder

Friday 22 September 2006 9:31:19 am

In case you have ideas and just for my notes. These are the steps I took:
-OS: windows
-installed apache 2.0.55 with winnt MPM
-installed mysql 5.0.18
-start mysql and apache services
-installed php 5.1.6 and verify with phpinfo()
-unzip ezpublish 3.8.4 to htdocs
-rename to ez_php5
-unzip ezpublish_384_php5.tar.gz (version Sept 22) over top
-browse http://localhost/ez_php5/index.php
-errors:
(No images appear)

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in C:\Program Files\Apache Group\Apache2\htdocs\ez_php5\lib\ezutils\classes\ezsys.php on line 821			
Module not found

The requested module setup could not be found.

-tried type casting ezsys.php line to array again. Fixes warning, but still no setup module
-tried moving ez_php5 to root of htdocs. Now images appear. But still no setup module. Ezpublish error log says "No such attribute for array(6): help" and summary and progress

Kristof Coomans

Saturday 23 September 2006 9:30:41 am

@Samuel:

You do not need to use the official tar first, just skip that step. I think you did not completely extract my tar.gz archive (extract once and you get a ez_php5.tar file, extract that one too and you're done) and that you're just using the official eZ publish.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Michael Maclean

Saturday 23 September 2006 9:54:48 am

@Kristoff: I just tried installing the official 384 and I didn't see any trace of a warning there with debugging switched on. I'll shortly go off and try installing your new tarball with the settings from one of our sites like I did before and see what happens.

eZpedia community documentation project | http://ezpedia.org

Kristof Coomans

Tuesday 26 September 2006 3:47:46 am

I inspected the eZContentObjectPackageHandler code that triggered the fatal error and I think it does not make any sense, so I posted a bug report about it: http://ez.no/bugs/view/9069.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Kristof Coomans

Tuesday 26 September 2006 12:14:50 pm

It's in svn now: http://pubsvn.ez.no/svnparent/nextgen_php5

If you want write access, register on http://pubsvn.ez.no/projects and mail me your user name.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Xavier Dutoit

Wednesday 27 September 2006 8:28:16 am

Hi,

I suppose that's the

http://pubsvn.ez.no/svnparent/nextgen_php5/stable/3.8 ?

(ie not the original which is the branch of a 3.8 php4, isn't it ? )

X+

http://www.sydesy.com

Kristof Coomans

Thursday 28 September 2006 2:40:13 am

Hi Xavier

Yes, you're right. I've explained the layout in a reply on the previous page:<i>http://ez.no/community/forum/developer/ez_publish_3_x_on_php_5#msg109346</i>. Because no one commented on that I've chosen the easy way.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Samuel Sauder

Friday 29 September 2006 10:42:10 am

@Kristof,
I made much more progress with using the version from pubsvn. (I wonder if my windows zip client was messing up my previous attempts?)
My environment is same as above

Minor issues:
1. strtotime and strftime strict errors in xzy\\ez_php5\lib\ezutils\classes\ezdebug.php on line 898

2. If I try to choose to send a registration email (in the last step of setup) I get this. But it is possible my SMTP and firewall are not allowing correct operation too...

 PHP Fatal error:  Using $this when not in object context in xyz\\ez_php5\\lib\\ezutils\\classes\\ezmail.php on line 621, referer: http://localhost/ez_php5/index.php

I need to stop for now, but so far it looks great!

Kristof Coomans

Saturday 30 September 2006 6:25:02 am

Hello Samuel

1. Can you give us the exact error message?
2. I fixed this in svn.

Thanks for testing!

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Kristof Coomans

Monday 02 October 2006 6:44:05 am

Someone posted an article about this port on Hiveminds Magazine: http://www.hiveminds.co.uk/node/3126

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Kristof Coomans

Tuesday 17 October 2006 1:03:43 am

I have re-enabled the I18n caching that's causing troubles, but added some debug messages showing the cache paths. I also tried including the cache files in a CLI script outside of eZ publish and I end up with the same problem. Using PHP 5.1.2 on Suse Linux.

With PHP4.4 it works fine.

I hope Derick or some other PHP guru will have some time to help us fixing this issue.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Kristof Coomans

Wednesday 25 October 2006 2:43:07 am

It seems like PHP 5.1.6 (I compiled it myself on Suse 10.1) does not display the cache files but parses them correctly.

Can somebody confirm the bug on other Linux systems with PHP 5.1.2?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Kristof Coomans

Friday 27 October 2006 5:10:05 am

I found what caused the cache bug. It happens when PHP is compiled with --enable-zend-multibyte and the mbstring extension is enabled. So it should work fine on other systems.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.