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. ­čÖé

 

 


VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Related Posts Plugin for WordPress, Blogger...

Comments

Total Views :474
avatar

About Admin