Compatibility problems with PHP 5

php.internals

Andi Gutmans

22 years ago
Hi guys, Now that we're at a very advanced stage and the code freeze is coming up, I think it'd be a good idea to start running some PHP 4 applications on PHP 5 and see how easy things go. I'm sure we'll bump into some issues and many of them might be solvable (using the already existing compatibility mode for object cloning or by other means). If anyone here has time or has already tried running some popular PHP packages such as php-nuke, phpbb, phpmyadmin and so on, I'd love to hear about your experience and especially the problems. Thanks, Andi

epplestun

22 years ago
Hi Andi, I try phpmyadmin with php 5.0.0beta1 under Red Hat 9 and works perfect. ----- Original Message ----- From: "Andi Gutmans" <andi@zend.com> To: <internals@lists.php.net>; <php-qa@lists.php.net> Sent: Wednesday, November 26, 2003 4:32 PM Subject: [PHP-DEV] Compatibility problems with PHP 5
> Hi guys, > > Now that we're at a very advanced stage and the code freeze is coming up,
I
> think it'd be a good idea to start running some PHP 4 applications on PHP
5

Marcus Börger

22 years ago
Hello Ivan, same for me with a two weeks old 5b2-dev. It also runs other applications and only one had to be patched (i didn't knew it was running n the server). Thursday, November 27, 2003, 10:51:34 AM, you wrote:
> Hi Andi, I try phpmyadmin with php 5.0.0beta1 under Red Hat 9 and works > perfect.
> ----- Original Message ----- > From: "Andi Gutmans" <andi@zend.com> > To: <internals@lists.php.net>; <php-qa@lists.php.net> > Sent: Wednesday, November 26, 2003 4:32 PM > Subject: [PHP-DEV] Compatibility problems with PHP 5
>> Hi guys, >> >> Now that we're at a very advanced stage and the code freeze is coming up, > I >> think it'd be a good idea to start running some PHP 4 applications on PHP > 5 >> and see how easy things go. I'm sure we'll bump into some issues and many >> of them might be solvable (using the already existing compatibility mode >> for object cloning or by other means). >> >> If anyone here has time or has already tried running some popular PHP >> packages such as php-nuke, phpbb, phpmyadmin and so on, I'd love to hear >> about your experience and especially the problems. >> >> Thanks, >> Andi >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >>
-- Best regards, Marcus mailto:helly@php.net

Andi Gutmans

22 years ago
What had to be patched? Is it something we can fix or add to a compatibility mode? Andi At 11:24 AM 11/27/2003 +0100, Marcus Boerger wrote:

Christian Schneider

22 years ago
Andi Gutmans wrote:
> issues and many of them might be solvable (using the already existing > compatibility mode for object cloning or by other means).
Could we please, please, please have a way of cloning objects which works in both versions? I'd like to use the new semantics as soon as it's available (no compatibility mode) but still be able to run my application on PHP4. See my posting about the need for a clone() function. I didn't get an answer there so I wonder how everyone else is dealing with this issue. - Chris

Derick Rethans

22 years ago
On Wed, 26 Nov 2003, Andi Gutmans wrote:
> If anyone here has time or has already tried running some popular PHP > packages such as php-nuke, phpbb, phpmyadmin and so on, I'd love to hear > about your experience and especially the problems.
make install segfaults at the moment, see the mail I posted yesterday. Testing stuff is quite hard now... Derick

Andi Gutmans

22 years ago
Great to hear that! At 10:51 AM 11/27/2003 +0100, Ivan Rodriguez wrote:

Andi Gutmans

22 years ago
At 11:00 AM 11/27/2003 +0100, Christian Schneider wrote:
>Andi Gutmans wrote: >>issues and many of them might be solvable (using the already existing >>compatibility mode for object cloning or by other means). > >Could we please, please, please have a way of cloning objects which works >in both versions? I'd like to use the new semantics as soon as it's >available (no compatibility mode) but still be able to run my application >on PHP4. > >See my posting about the need for a clone() function. I didn't get an >answer there so I wonder how everyone else is dealing with this issue.
You can use the zend2.implicit_clone INI directive (change it at run-time if you want at the beginning of the application). Andi

Christian Schneider

22 years ago
Andi Gutmans wrote:
> You can use the zend2.implicit_clone INI directive (change it at > run-time if you want at the beginning of the application).
But I do want to move my application to the new semantics, I think it is much more reasonable than the PHP4 behaviour anyway (sadly enough my request to ref instead of copy on assignment was turned down in the PHP4 alpha days ;-)). I simply want to have a way of doing an explicit clone where it is really needed. I still can't see no reason why there should be no migration path for this. PHP5 adoption is going to be hard enough due to subtle bugs arising from this so I think clone() is the least we could do here. Forcing people to use zend2.implicit_clone won't help this IMHO. - Chris

Marcus Börger

22 years ago
Hello Christian, Thursday, November 27, 2003, 11:51:06 AM, you wrote:
> Andi Gutmans wrote: >> You can use the zend2.implicit_clone INI directive (change it at >> run-time if you want at the beginning of the application).
> But I do want to move my application to the new semantics, I think it is > much more reasonable than the PHP4 behaviour anyway (sadly enough my > request to ref instead of copy on assignment was turned down in the PHP4 > alpha days ;-)).
> I simply want to have a way of doing an explicit clone where it is > really needed. I still can't see no reason why there should be no > migration path for this. PHP5 adoption is going to be hard enough due to > subtle bugs arising from this so I think clone() is the least we could > do here. Forcing people to use zend2.implicit_clone won't help this IMHO.
If i get you right you want to have __clone() for PHP4, too right? But that's already to late. And using it on PHP5 to emulate PHP4 behavior where needed might not solve all problems, so what can we do besides __clone and the ini directive?
-- Best regards, Marcus mailto:helly@php.net

Christian Schneider

22 years ago
Marcus Boerger wrote:
> If i get you right you want to have __clone() for PHP4, too right? But > that's already to late.
That's what I was told when I was asking for ref on assignment for PHP4. And now we have to go through this hassle for PHP5. I simply cannot believe noone thought of this problem when it was still possible to add it to PHP4 _and_ we stick to this just for the sake of a feature freeze. The function is so trivial (and IMHO so important) that being strict here seems plain wrong to me. After all it hinders migration to PHP5! - Chris

Derick Rethans

22 years ago
On Thu, 27 Nov 2003, Christian Schneider wrote:
> Marcus Boerger wrote: > > If i get you right you want to have __clone() for PHP4, too right? But > > that's already to late. > > That's what I was told when I was asking for ref on assignment for PHP4. > And now we have to go through this hassle for PHP5. I simply cannot > believe noone thought of this problem when it was still possible to add > it to PHP4 _and_ we stick to this just for the sake of a feature freeze. > The function is so trivial (and IMHO so important) that being strict > here seems plain wrong to me. After all it hinders migration to PHP5!
Just use an auto_prepend which sets the implicit_clone option... no problems then anymore. Derick

Christian Schneider

22 years ago
Derick Rethans wrote:
> Just use an auto_prepend which sets the implicit_clone option... no > problems then anymore.
*Sigh* Looks like you're not reading my postings really. This means your migration path to ref on assignement semantics is: 1) current code, copy (PHP4) 2) wait months for PHP5 to be ready for production, twidddling thumbs 3) current code, copy (Switch to PHP5 with implicit clone) 4) atomic rewrite, ref (PHP5, incompatible with PHP4) So I can't start to migrate my code to PHP5 yet *or* I have to branch my code at 2) just for this which I won't do as it could be a couple of months until we decide it is ready for production machines. And I can't switch back to PHP4 if I run into other problems. But ok, seems like I'm the only one bothered by this. - Chris

Wez Furlong

22 years ago
Hey Christian, Why not add your own clone() function to your apps; something like this: if (version_compare(phpversion(), "5.0", "<")) { function clone($object) { return $object; } } else { function clone($object) { return $object->__clone(); } } then (re)write all your code to call clone() where you need it. [I know that this is what you want to have in php 4 and php 5 right now anyway; but its only a couple of lines of code to add to your project] --Wez.

Christian Schneider

22 years ago
Wez Furlong wrote:
> Why not add your own clone() function to your apps;
If you read my original posting you'll notice that I've already done this but I thought other people have exactly the same problem. Looks like I was wrong. - Chris

Björn Schotte

22 years ago
Hi Christian, * Christian Schneider wrote:
> If you read my original posting you'll notice that I've already done > this but I thought other people have exactly the same problem.
I think they solve the problem exactly the way Wez told you.
-- Schnellanbindung an 350 Standorte?! CaseStudy anfordern unter: transaktionsserver@emailseminar.de ThinkPHP / rent-a-phpwizard bjoern@thinkphp.de Sedanstraße 27 Tel: 0931 / 78 43 804 97082 Würzburg Fax: 0931 / 78 43 795 http://www.thinkphp.de/ http://www.rent-a-phpwizard.de/

Jan Schneider

22 years ago
Zitat von Andi Gutmans <andi@zend.com>:
> Hi guys, > > Now that we're at a very advanced stage and the code freeze is coming up, > I > think it'd be a good idea to start running some PHP 4 applications on PHP > 5 > and see how easy things go. I'm sure we'll bump into some issues and many > of them might be solvable (using the already existing compatibility mode > for object cloning or by other means). > > If anyone here has time or has already tried running some popular PHP > packages such as php-nuke, phpbb, phpmyadmin and so on, I'd love to hear > about your experience and especially the problems.
Horde et al suffered from new reserved words, the known return-non-variables-by-reference-problem, the changed array_merge() behaviour/notification and not working on-the-fly-generation of stdClass objects. It's not that much of a problem for us as we will release new major versions near to the PHP 5 release, that will be tested with PHP HEAD. Jan.
-- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft

Edin Kadribasic

22 years ago
On Thursday 27 November 2003 11:47, Jan Schneider wrote: [snip]
> behaviour/notification and not working on-the-fly-generation of stdClass > objects. It's not that much of a problem for us as we will release new
What exactly is the problem with stdClass? We have a lot of code overhere that rely on stdClass behaiving as it did in php4. Edin

Derick Rethans

22 years ago
On Thu, 27 Nov 2003, Edin Kadribasic wrote:
> On Thursday 27 November 2003 11:47, Jan Schneider wrote: > [snip] > > behaviour/notification and not working on-the-fly-generation of stdClass > > objects. It's not that much of a problem for us as we will release new > > What exactly is the problem with stdClass? We have a lot of code overhere that > rely on stdClass behaiving as it did in php4.
By doing this: <?php $tpl->foo = 'blaat'; ?> in PHP 4 you would get a object of stdClass, in PHP 5 you get a warning. Derick

Edin Kadribasic

22 years ago
Andi, any chance of fixing this? I think there was a long thread on engine2 about this and there was an agreement that this should work as in php4. Edin On Thursday 27 November 2003 13:47, Derick Rethans wrote:

Jan Schneider

22 years ago
Zitat von Edin Kadribasic <edink@emini.dk>:
> On Thursday 27 November 2003 11:47, Jan Schneider wrote: > [snip] > > behaviour/notification and not working on-the-fly-generation of > stdClass > > objects. It's not that much of a problem for us as we will release new > > What exactly is the problem with stdClass? We have a lot of code overhere > that > rely on stdClass behaiving as it did in php4.
Actually I'm not sure if this problem still exists, but I found that checking our commits related to ZE2 fixes. Creating objects on the fly didn't work or at least raised a warning/error. I changed code like: $not_existing_object->foo = "bar"; to: $not_existing_object = new stdClass(); $not_existing_object->foo = "bar"; Jan.
-- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft

Derick Rethans

22 years ago
Hey, On Wed, 26 Nov 2003, Andi Gutmans wrote:
> Now that we're at a very advanced stage and the code freeze is coming up, I > think it'd be a good idea to start running some PHP 4 applications on PHP 5 > and see how easy things go. I'm sure we'll bump into some issues and many > of them might be solvable (using the already existing compatibility mode > for object cloning or by other means).
There is one major problem that I see at this moment, and that is the problem with shutdown order and destructors. Problem 1: extension=mysql.so <?php class foo { private $c; function __construct() { $this->c = mysql_connect(); } function __destruct() { mysql_close($this->c); } } $f = new foo(); ?> This little script will give you a nice unresolved symbol when doing the mysql_close as the extensions are unloaded before the dtors run. Problem 2: The following script: <?php class A { public function __destruct() { echo "destructor!\n"; } } $obj = new A(); echo "I'm alive!\n"; ?> crashes Xdebug. While I thought it was *my* bug, it turned out to have the same cause as problem 1: the dtor is run after the GET/POST/COOKIE var tables are destroyed. (Xdebug tries to check some things in there on every function call). It's not only this, see problem 3. 788 zend_hash_find(PG(http_globals)[TRACK_VARS_GET]->value.ht, "XDEBUG_SESSION_START", sizeof("XDEBUG_SESSION_START"), (void **) &dummy) == SUCCESS (gdb) bt #0 0x0826325d in _zend_is_inconsistent (ht=0x5a5a5a5a, file=0x8417660 "/dat/dev/php/php-5.0dev/Zend/zend_hash.c", line=841) at /dat/dev/php/php-5.0dev/Zend/zend_hash.c:53 #1 0x082656f1 in zend_hash_find (ht=0x5a5a5a5a, arKey=0x406446bd "XDEBUG_SESSION_START", nKeyLength=21, pData=0xbfffe70c) at /dat/dev/php/php-5.0dev/Zend/zend_hash.c:841 #2 0x406325dd in xdebug_execute (op_array=0x405f9000) at /dat/dev/php/xdebug/xdebug.c:788 #3 0x08252cd3 in zend_call_function (fci=0xbfffec20, fci_cache=0x0) at /dat/dev/php/php-5.0dev/Zend/zend_execute_API.c:737 (gdb) frame 3 #3 0x08252cd3 in zend_call_function (fci=0xbfffec20, fci_cache=0x0) at /dat/dev/php/php-5.0dev/Zend/zend_execute_API.c:737 737 zend_execute(EG(active_op_array) TSRMLS_CC); (gdb) print *executor_globals.active_op_array $2 = {type = 2 '\002', function_name = 0x405f5608 "__destruct", scope = 0x405f7518, fn_flags = 16640, prototype = 0x0, num_args = 0, arg_info = 0x0, pass_rest_by_reference = 0 '\0', refcount = 0x405f792c, opcodes = 0x405f7968, last = 5, size = 5, T = 0, brk_cont_array = 0x0, last_brk_cont = 0, current_brk_cont = 4294967295, static_variables = 0x0, start_op = 0x0, backpatch_count = 0, return_reference = 0 '\0', done_pass_two = 1 '\001', uses_this = 0 '\0', filename = 0x405f5d8c "/dat/dev/php/xdebug/tests/bug00001.php", line_start = 3, line_end = 5, doc_comment = 0x0, doc_comment_len = 0, reserved = {0x0, 0x1, 0x8414a60, 0x923}} Problem 3: All extension globals are also destroyed before destructors run: 0x40631ac0 in add_stack_frame (zdata=0xbfffeb80, op_array=0x405f9000, type=0) at /dat/dev/php/xdebug/xdebug.c:684 684 xdebug_llist_insert_next(XG(stack), XDEBUG_LLIST_TAIL(XG(stack)), tmp); (gdb) bt #0 0x40631ac0 in add_stack_frame (zdata=0xbfffeb80, op_array=0x405f9000, type=0) at /dat/dev/php/xdebug/xdebug.c:684 #1 0x40632040 in xdebug_execute (op_array=0x405f9000) at /dat/dev/php/xdebug/xdebug.c:830 #2 0x08252cd3 in zend_call_function (fci=0xbfffec20, fci_cache=0x0) at /dat/dev/php/php-5.0dev/Zend/zend_execute_API.c:737 (gdb) print xdebug_globals.stack $2 = (xdebug_llist *) 0x0 (this variable is initialized in MINIT and destroyed in MSHUTDOWN). Parts of a chat with Zeev about this: 12:11 <@Derick> the hook you added "exec_finished" didn't solve my problem 12:11 <@Derick> because destructors are still called AFTER RSHUTDOWN :( 12:11 <@Zeev> they're not supposed to 12:11 <@Zeev> but I didnt do anything beyond exec_finished 12:11 <@Zeev> that is, nothing uses it yet 12:11 <@Derick> so what's the point of it ? :) 12:11 <@Zeev> the point is that it solves the problem 12:11 <@Zeev> once things start using it :) 12:12 <@Zeev> I can barely type 12:12 <@Zeev> my fingers are on fire 12:12 <@Derick> well, then the ZE needs to be modified to use it ;) 12:12 <@Derick> Zeev: peppers? 12:12 <@Zeev> derick the engine isnt supposed to use it 12:12 <@Derick> heh 12:12 <@Zeev> it simply has to call destructors after exec_finished 12:12 <@Zeev> but before rshutdown 12:12 <@Derick> yes 12:13 <@Zeev> but we cant do that before modules like the session module implement exec_finished 12:13 <@Derick> doesn't that need an engine mod then? 12:13 <@Derick> Zeev: ah ha 12:13 <@Zeev> because they're the reason destructors are called after rshutdown to begin with 12:13 <@Zeev> and yeah 12:13 <@Derick> Zeev: the problem is that if you mod session, the stuff needs to work first ... it's a chicken and egg problemm Related test case: 14:46 <@Derick> ZE2 accessing globals from destructor in shutdown [tests/classes/destructor_and_globals.phpt] 14:46 <@Derick> Andi_: thats the one I told you about a couple of days ago btw regards, Derick

Marcus Börger

22 years ago
Hello Derick, Thursday, November 27, 2003, 11:54:07 AM, you wrote:
> Hey,
> On Wed, 26 Nov 2003, Andi Gutmans wrote:
>> Now that we're at a very advanced stage and the code freeze is coming up, I >> think it'd be a good idea to start running some PHP 4 applications on PHP 5 >> and see how easy things go. I'm sure we'll bump into some issues and many >> of them might be solvable (using the already existing compatibility mode >> for object cloning or by other means).
> There is one major problem that I see at this moment, and that is the > problem with shutdown order and destructors.
> Problem 1:
> extension=mysql.so
[...] Since about three month i have a patch to fix this. The latest update can be found here: http://marcus-boerger.de/php/ext/ze2/ze2-shutdown-20031002.diff.txt Tell me if it doesn't apply then i'll update it. What it basically does is destructing the zval's in correct order. The old algorythm had a magnitude of O(n) while the new one has a magnitude of O(n*log(n)) while it should have a normal runtime of N(n) in most cases too. Maybe it is a little bit slower so that runtime could be written as N(n*c) with 1 < c < 1.1. Since we never cared about shutdown time this should be ok anyways. Also the inner loop breaks at a mximum of 64 where its minimum depends on the outer loop. That means that in worst case scenarios that the algorythmn can't solve a few variables take more time then the rest but at least they are freed anyway.
-- Best regards, Marcus mailto:helly@php.net

Stanislav Malyshev

22 years ago
MB>> with 1 < c < 1.1. Since we never cared about shutdown time this MB>> should be ok If we are talking about request shutdown, we definitely do care about it. Slower is the request shutdown, more time the httpd process/thread takes per request, more load on the server.
-- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.109

Marcus Börger

22 years ago
Hello Stanislav, Thursday, November 27, 2003, 1:00:20 PM, you wrote: MB>>> with 1 < c < 1.1. Since we never cared about shutdown time this MB>>> should be ok
> If we are talking about request shutdown, we definitely do care about it. > Slower is the request shutdown, more time the httpd process/thread takes > per request, more load on the server.
Ok, sure we care in request shutdown but at least page delivery isn't affected by the patch. And anyway a little bit slowdown is much better then loosing one of the major oo features to be introduced with php5. And the slowdoen is of course only in one functionality. And it allows things that make the whole script faster so i don't see any problem with it.
-- Best regards, Marcus mailto:helly@php.net

Stanislav Malyshev

22 years ago
MB>> Ok, sure we care in request shutdown but at least page delivery isn't MB>> affected by the patch. Definitely it is. The fact that it's _next_ page delivery that would be affected is not helping much - any page but the very first since server run is the next for some page and it is reasonable to expect that on the loaded server the pages are requested continiously. Side note - could you give me a quick explanation about what you patch is meant to do? MB>> loosing one of the major oo features to be introduced with php5. And the Do you mean destructors? MB>> slowdoen is of course only in one functionality. And it allows things that MB>> make the whole script faster so i don't see any problem with it. Like what?
-- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.109

Marcus Börger

22 years ago
Hello Stanislav, Thursday, November 27, 2003, 1:28:36 PM, you wrote: MB>>> Ok, sure we care in request shutdown but at least page delivery isn't MB>>> affected by the patch.
> Definitely it is. The fact that it's _next_ page delivery that would be > affected is not helping much - any page but the very first since server > run is the next for some page and it is reasonable to expect that on > the loaded server the pages are requested continiously.
> Side note - could you give me a quick explanation about what you patch is > meant to do?
It respects the refcoutning while destructing the zvals. MB>>> loosing one of the major oo features to be introduced with php5. And the
> Do you mean destructors?
sure MB>>> slowdoen is of course only in one functionality. And it allows things that MB>>> make the whole script faster so i don't see any problem with it.
> Like what?
Controlling life time of objects and hence you could also control lifetime of resources if you use php5 new database systems which use objects natively or if you use wrapper objects. So with destructors you can free them as soon as possible (automagically) without any further time consumpting tests. So you will also get lower memory usage for free which typically results in faster execution.
-- Best regards, Marcus mailto:helly@php.net

Stanislav Malyshev

22 years ago
MB>> It respects the refcoutning while destructing the zvals. I don't exacetly understand _how_ it respects them so that this solves the circular dependency problem. In fact, in the patch in the URL you have sent I don't even see one call to destructor. Also, does you patch take into account the fact that a number of zvals can refer to the same object? MB>> Controlling life time of objects and hence you could also control MB>> lifetime of resources if you use php5 new database systems which use MB>> objects natively or if you use wrapper objects. So with destructors MB>> you can free them as soon as possible (automagically) without any MB>> further time consumpting tests. So you will also get lower memory I don't see how you can do that. Only place when you don't have to call dtor manually and can be sure the object is destroyed is the end of the request. But by the end of the request all resources are freed anyway, so you don't need dtors to free them.
-- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.109

Marcus Börger

22 years ago
Hello Stanislav, Thursday, November 27, 2003, 3:32:25 PM, you wrote: MB>>> It respects the refcoutning while destructing the zvals.
> I don't exacetly understand _how_ it respects them so that this solves the > circular dependency problem. In fact, in the patch in the URL you have > sent I don't even see one call to destructor. Also, does you patch take > into account the fact that a number of zvals can refer to the same object?
When a zval is an object and it gets freed the destructor is called. MB>>> Controlling life time of objects and hence you could also control MB>>> lifetime of resources if you use php5 new database systems which use MB>>> objects natively or if you use wrapper objects. So with destructors MB>>> you can free them as soon as possible (automagically) without any MB>>> further time consumpting tests. So you will also get lower memory
> I don't see how you can do that. Only place when you don't have to call > dtor manually and can be sure the object is destroyed is the end of the > request. But by the end of the request all resources are freed anyway, so > you don't need dtors to free them.
Well i can test my scripts - and i do understand refcounting and php. So at least an expirienced programmer can take advantage.
-- Best regards, Marcus mailto:helly@php.net

Jan Lehnardt

22 years ago
Hi Andi, On 26 Nov 2003, at 16:32, Andi Gutmans wrote:
> If anyone here has time or has already tried running some popular PHP > packages such as php-nuke, phpbb, phpmyadmin and so on, I'd love to > hear about your experience and especially the problems.
I forwarded this to pear-dev. I know that some people are already playing with 5 there, so they could share their results. Jan
-- Q: Thank Jan? - A: http://geschenke.an.dasmoped.net/ "We cats are very independent. We need nobody, no time, no where, no way. Isn't that right Pooky?" - Garfield Key Fingerprint 7BCC EB86 8313 DDA9 25DF 1805 ECA5 BCB7 BB96 56B0

messju mohr

22 years ago
Hello, On Wed, Nov 26, 2003 at 05:32:29PM +0200, Andi Gutmans wrote:
> Hi guys, > > Now that we're at a very advanced stage and the code freeze is coming up, I > think it'd be a good idea to start running some PHP 4 applications on PHP 5 > and see how easy things go. I'm sure we'll bump into some issues and many > of them might be solvable (using the already existing compatibility mode > for object cloning or by other means). > > If anyone here has time or has already tried running some popular PHP > packages such as php-nuke, phpbb, phpmyadmin and so on, I'd love to hear > about your experience and especially the problems.
Version 2.6.0 (the latest) of the Smarty template engine seems to go fine with php5. There is one new and rarely used feature in this version that relies on passing a function-parameter that has to be named "$this". But I'm sure this will be fixed in the near future. Older versions of Smarty create code that calls functions dynamically "$this->_plugins['function']['foo'][0](array(), $this)". This seems to break in php-5. greetings messju

Hartmut Holzgraefe

22 years ago
function table creation works fine, but as it doesn't use any OO stuff at all it is not *that* astonishing ... ;)
-- Hartmut Holzgraefe <hartmut@php.net>

Sebastian Bergmann

22 years ago
Andi Gutmans wrote:
> If anyone here has time or has already tried running some popular PHP > packages such as php-nuke, phpbb, phpmyadmin and so on, I'd love to > hear about your experience and especially the problems.
Dunno if these are popular, but phpOpenTracker and XML_Transformer work fine. I had to change function &get($parameters) { include_once POT_INCLUDE_PATH . 'API.php'; $api = &phpOpenTracker_API::getInstance(); return $api->get($parameters); } to function &get($parameters) { include_once POT_INCLUDE_PATH . 'API.php'; $api = &phpOpenTracker_API::getInstance(); $result = $api->get($parameters); return $result; } but I think that this is a known problem.
-- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/