Page 1 of 1

Functions split / eregi deprecated in Joomla 1 with php 5.3

Posted: Mon Feb 21, 2011 11:47 am
by translatum
I get a lot of these errors for a Joomla 1 site
http://www.art-teachers.com

Code: Select all

Deprecated: Function split() is deprecated in /home/art/public_html/templates/rt_pixel/index.php on line 4
Deprecated: Function eregi() is deprecated in /home/art/public_html/includes/sef.php on line 533
Deprecated: Function eregi() is deprecated in /home/art/public_html/includes/sef.php on line 393
Deprecated: Assigning the return value of new by reference is deprecated in /home/art/public_html/mambots/content/multithumb.php on line 45

Deprecated: Assigning the return value of new by reference is deprecated in /home/art/public_html/mambots/content/bot_adsense.php on line 47
I turned off error reporting from within joomla but I still get the errors. Any ideas how to solve this?

Re: Functions split / eregi deprecated in Joomla 1 with php

Posted: Mon Feb 21, 2011 1:52 pm
by dhuelsmann
Yes...Joomla 1.0.x is not compatible with php 5.3. Either downgrade php to 5.2 or migrate yoour site to Joomla 1.5.22.

Re: Functions split / eregi deprecated in Joomla 1 with php

Posted: Mon Feb 21, 2011 2:32 pm
by translatum
I have a couple of other J1 sites running on the same server which work just fine (after using this patch), so I guess there must be a less drastic solution like:

http://devthought.com/2009/06/09/fix-er ... in-php-53/
http://takien.com/513/how-to-fix-functi ... -5-3-0.php

Unfortunately, I tried myself applying those changes but the task was beyond me.

As for split the error is:

Code: Select all

Deprecated: Function split() is deprecated in ...public_html/templates/rt_pixel/index.php on line 4
and the template file:

Code: Select all

<?php

defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

require($mosConfig_absolute_path."/templates/" . $mainframe->getTemplate() . "/rt_styleswitcher.php");

$iso = [b]split[/b]( '=', _ISO );
Here they recommend changing split with preg_split. I did it, and now I have one error less on home page but on another page I get:

Code: Select all

Warning: preg_split() [function.preg-split]: No ending delimiter '=' found in /home/art/public_html/templates/rt_pixel/index.php on line 4

Re: Functions split / eregi deprecated in Joomla 1 with php

Posted: Mon Feb 21, 2011 2:57 pm
by dhuelsmann
The problem, of course, is that not only is the Joomla 1.0.x series no longer supported neither are the many 1.0.x extensions that were written. In your case, even tho you may have patched Joomla to work, you have not patched the extensions you have added. That doesn't even begin to address the possibility that there may now be some serious security problems with the 1.0.x series that have not been resolved as well as with the extensions. You really should migrate.

Re: Functions split / eregi deprecated in Joomla 1 with php

Posted: Mon Feb 21, 2011 3:16 pm
by translatum
Yes, I know migrating is the only wise solution, but I am looking for a quick fix until I get to that point since it is no mean task for the specific site and I do not want errors to be displayed until it is done.

By the way, what is the latest exact safe php version (5.2.x) for J1?

Re: Functions split / eregi deprecated in Joomla 1 with php

Posted: Tue Feb 22, 2011 1:38 pm
by translatum
Here is a fixed sef.php file in case anyone bumps into this error.
http://www.translatum.gr/forum/index.php?topic=123457.0

The split issue was fixed by replacing split with explode.

Re: Functions split / eregi deprecated in Joomla 1 with php

Posted: Fri Oct 14, 2011 6:33 am
by gurukatre
Use explode instead of split, this will solve your problem. :)

Re: Functions split / eregi deprecated in Joomla 1 with php

Posted: Tue Oct 25, 2011 12:44 pm
by beededea
Just move to a good host that provides what is required for Joomla 1.0. If you need a recommendation, pleased to provide.