Deprecated: Function eregi() is deprecated – Simple ImageShack

php

Error :

——————————-

Deprecated: Function eregi() is deprecated in /home/XXXXXX/public_html/forum/sis/SISxmlapi.php on line 166
Deprecated: Function eregi() is deprecated in /home/XXXXXX/public_html/forum/sis/SISxmlapi.php on line 166
Deprecated: Function eregi() is deprecated in /home/XXXXXX/public_html/forum/sis/SISxmlapi.php on line 166
Deprecated: Function eregi() is deprecated in /home/XXXXXX/public_html/forum/sis/SISxmlapi.php on line 166
Deprecated: Function eregi() is deprecated in /home/XXXXXX/public_html/forum/sis/SISxmlapi.php on line 166
Deprecated: Function eregi() is deprecated in /home/XXXXXX/public_html/forum/sis/SISxmlapi.php on line 166

——————————-

Situation :

I came across this warning while using a mod ‘Simple ImageShack’ in on of my simplemachines forums [SMF] , i searched the google for this and found out a solution and want to share this with you. I think some of you have came across this and will be helpful for some of them 🙂

Solution :

what i did is,

1) edited the line 166 in /home/XXXXXX/public_html/forum/sis/SISxmlapi.php , for this you can use file manager of any kind that your hosting provides or you can ssh to server in linux if you have ssh access.


2) eregi function in php was the issue because in php 5.3.X it was depricated , i used preg_match instead. Detailed explanation below.

2) Changed the whole line ie 166th line ‘if($xmlDatum != “” && !eregi(“links”,$xmlDatum) && !eregi(“xml”,$xmlDatum)){‘

With ‘if($xmlDatum != “” && !preg_match(“/links/i”,$xmlDatum) && !preg_match(“/xml/i”,$xmlDatum)){‘

Note : it wasn’t only eregi that was changes to preg_match , in the revised syntax you can see delimeter ‘//’ has also been added.

Iam not a php freak but only a google crawler 😀 Hope this helps someone. 🙂

 

 


Related Posts Plugin for WordPress, Blogger...

Comments

Total Views :1,905
avatar

About Admin