Functions split / eregi deprecated in Joomla 1 with php 5.3

General questions relating to Joomla! There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
User avatar
translatum
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 118
Joined: Sat Dec 31, 2005 12:54 am
Contact:

Functions split / eregi deprecated in Joomla 1 with php 5.3

Post by translatum » Mon Feb 21, 2011 11:47 am

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?

User avatar
dhuelsmann
Joomla! Master
Joomla! Master
Posts: 19659
Joined: Sun Oct 02, 2005 12:50 am
Location: Omaha, NE
Contact:

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

Post by dhuelsmann » Mon Feb 21, 2011 1:52 pm

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.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org

User avatar
translatum
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 118
Joined: Sat Dec 31, 2005 12:54 am
Contact:

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

Post by translatum » Mon Feb 21, 2011 2:32 pm

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
Last edited by translatum on Mon Feb 21, 2011 3:21 pm, edited 2 times in total.

User avatar
dhuelsmann
Joomla! Master
Joomla! Master
Posts: 19659
Joined: Sun Oct 02, 2005 12:50 am
Location: Omaha, NE
Contact:

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

Post by dhuelsmann » Mon Feb 21, 2011 2:57 pm

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.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org

User avatar
translatum
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 118
Joined: Sat Dec 31, 2005 12:54 am
Contact:

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

Post by translatum » Mon Feb 21, 2011 3:16 pm

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?

User avatar
translatum
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 118
Joined: Sat Dec 31, 2005 12:54 am
Contact:

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

Post by translatum » Tue Feb 22, 2011 1:38 pm

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.

gurukatre
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Tue Apr 28, 2009 7:37 am
Location: pune
Contact:

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

Post by gurukatre » Fri Oct 14, 2011 6:33 am

Use explode instead of split, this will solve your problem. :)
Thanks
Kind Regards

User avatar
beededea
Joomla! Hero
Joomla! Hero
Posts: 2809
Joined: Wed Oct 31, 2007 3:48 pm
Location: Victorian England 1885

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

Post by beededea » Tue Oct 25, 2011 12:44 pm

Just move to a good host that provides what is required for Joomla 1.0. If you need a recommendation, pleased to provide.
Yereverluvinunclebert
Steampunk widgets. Platforms of choice: Joomla 1.0/1.5, Joostina 1.2, OSCommerce
Site aims: Optimisation, Security and Solidity
http://widgets.yahoo.com/widgets/steamp ... k-calendar


Locked

Return to “General Questions - 1.0.x”