Re: [opensuse-factory] PHP - tales from the crypt
Stephan von Krawczynski escribió:
Really, Cristian, stop it.
No. you should stop acting like kid that mom denied a caramel. if you have a problem, fix it. if you are having incompatible scripts is your problem, not mine. in most cases you did something wrong in your test migration.. the most common faliures are.. 1. apps that depends on long arrays "HTTP_SERVER_VARS" et all. in that case set register_long_arrays to On in php.ini that will solve the problem. 2. apps that depends on register globals, in that case apps should be either upgraded or you can activete register_globals per directory basis with php_flag "register_globals On" 3. most PHP4 apps are not heavily object oriented, but a common problem you will find is code that no longer runs because "you cannot reasign $this", if you have code that do this. it is wrong, . $this is a reserved special variable, and you cannot reasign $this because in PHP5 objects are no longer mutable, although $this **can** be reasigned in PHP4, is an undocumented "feature" that does **not** really work as you expect.(aka. black magic) 4. some array functions only accept arguments of type array , and passing other kind of types witll cause either a warning or a fatal error, the fix is as simple as type casting the value to array 5. you may see "Fatal error: Nesting level too deep - recursive dependency?”" , if so, is almost sure the code has some kind of undetected infinite recursive dependency, all old PHP versions either detect it and return after a while, but can possible misbehave or crash, current PHP versions emits this proper error message, this is better explained here http://www.bigroom.co.uk/blog/php-nesting-level-too-deep-recursive-dependenc... there are other things too.
participants (1)
-
Cristian Rodriguez R.