I’m trying to upgrade a MODx 0.9.6.3 site to MODx 1.0.4 by transferring a copy of the site (with MODx 0.9.6.3) to a test server, and then sliding in the MODx 1.0.4 files and running the upgrader.
The new server has a newer OS version (a deliberate part of the plan), running PHP 5.3.2. When trying to load up the ’new’ 0.9.6.3 site just to check that the site transfer is OK, I get caught by the
Function split() is deprecated problem.
However, I’m thinking that since I’m imminently about to overwrite the 0.9.6.3 files with 1.0.4 files, I probably don’t
really need to worry about whether 0.9.6.3 works all that much. Is 1.0.4 affected by the same E_DEPRECATED problem, or is all of its code ’safe’ for PHP 5.3.x? Even though it’s just a test copy, I don’t want to fire up the upgrader and then find it gets stuck!
Thanks for any advice.
Please don't PM me unless it's absolutely essential: if a technical question is worth asking, it's worth asking in public, so that others can share their experience, and so that all can learn from the answers.
-
☆ A M B ☆
- 24,524 Posts
MODx itself is not affected. Some third-party snippets may be. You shouldn’t have a problem upgrading.
That sounds like your host turned on magic_quotes_gpc when upgrading.
If there is a php.ini file in the MODx root, add this:
If there is no php.ini file, just add one with that single line.
Quote from: david55 at Sep 13, 2010, 10:13 AM
I’m trying to upgrade a MODx 0.9.6.3 site to MODx 1.0.4 by transferring a copy of the site (with MODx 0.9.6.3) to a test server, and then sliding in the MODx 1.0.4 files and running the upgrader.
The new server has a newer OS version (a deliberate part of the plan), running PHP 5.3.2. When trying to load up the ’new’ 0.9.6.3 site just to check that the site transfer is OK, I get caught by the Function split() is deprecated problem.
However, I’m thinking that since I’m imminently about to overwrite the 0.9.6.3 files with 1.0.4 files, I probably don’t really need to worry about whether 0.9.6.3 works all that much. Is 1.0.4 affected by the same E_DEPRECATED problem, or is all of its code ’safe’ for PHP 5.3.x? Even though it’s just a test copy, I don’t want to fire up the upgrader and then find it gets stuck!
Thanks for any advice.
You can just put this in a php.ini file in the MODx root if you run into trouble (I know SPForm still has causes trouble with this -- haven’t had time to fix it):
error_reporting = E_ALL & ~E_DEPRECATED
Hi BobRay
Thanks so much for your reply. This might be a silly question but does that text go into the php.ini file without any other enclosing code? I’ve tried to add it (into the MODx root of my installation) but it’s unfortunately made no difference.
Quote from: rivendell48 at Oct 29, 2010, 03:39 AM
Hi BobRay
Thanks so much for your reply. This might be a silly question but does that text go into the php.ini file without any other enclosing code? I’ve tried to add it (into the MODx root of my installation) but it’s unfortunately made no difference.
I forgot that it’s being set dynamically in index.php. That’s overriding your php.ini setting. Sorry about the confusion.
Undo what you did with the php.ini file. In the index.php file in the MODx root, change:
error_reporting(E_ALL & ~E_NOTICE);
to
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
-
☆ A M B ☆
- 24,524 Posts
Actually Evo itself is not affected by this; the problem is that some commonly used third-party add-ons use the split() function instead of explode() or some other method of breaking up a string. It’s usually pretty simple to just replace the offending split() function with explode() or possibly preg-split().
http://php.net/manual/en/function.split.php
http://www.php.net/manual/en/function.explode.php
http://www.php.net/manual/en/function.preg-split.php
SPForm uses eregi(), which is also deprecated. I haven’t had time to change it and don’t know when I will.
-
☆ A M B ☆
- 24,524 Posts
Looks like it’s just a matter of replacing eregi() with stristr() on line 144 of spformproc.inc.php. I’ll give it a try a little later; still catching up after moving and two weeks offline!
http://www.php.net/manual/en/function.eregi.php
http://www.php.net/manual/en/function.stristr.php