Jump to content


Photo

Error: Function Ereg() Is Deprecated


  • Please log in to reply
6 replies to this topic

#1 0zz

0zz

    Etomite Forum Fan

  • Member
  • Pip
  • 86 posts

Posted 17 March 2012 - 07:44 AM

I've looked through the related issues, but could not find a working solution for the common problem with Eto 1.1. and php 5.3

Here it is:

« Error »
Etomite encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »

PHP error debug
  Error:  Function ereg() is deprecated
  Error type/ Nr.:  - 8192
  File:  /home/.../index.php(508) : eval()'d code
  Line:  9

I can't find where this "ereg() function" is located and what should I change it to.

Thank you!

#2 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 17 March 2012 - 10:10 PM

There is another topic related to that from this week... The answer can be found there...

http://www.etomite.c...__fromsearch__1

#3 0zz

0zz

    Etomite Forum Fan

  • Member
  • Pip
  • 86 posts

Posted 19 March 2012 - 04:53 AM

Yeah, but that one actually redirects to this topic which has to do with "Function Split() is Deprecated" error, and i thought it's different.

#4 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 19 March 2012 - 01:10 PM

I need to bookmark it but there should be a post the covers all of the deprecated PHP 5.3 functions as well as their replacements... Most of the regex functions simply need to be changed to their Perl equivilents... If all else fails there is a list on the PHP site, php.net which covers this...

split() gets changed to explode()
ereg() gets changed to preg()
ereg_*() gets changed to preg_*()

#5 0zz

0zz

    Etomite Forum Fan

  • Member
  • Pip
  • 86 posts

Posted 20 March 2012 - 05:55 AM

Thank you, Ralph!
You are right, it's a way easier for dummies like me to say "Help me!" and wait for the clear instructions, rather to search over php.net for solutions.
But, as I said, I am a php noob, and it will take me months to understand what to do.. so I'd rather follow step-by-step guidence..
It's clear, that some changes should be made in some files. And I did change all of those suggested by Dean in above mentioned topic, and also found and replaced "ereg" in Feedback snippet. But problem remains.. ((

I'll appreciate you follow-up support in this issue, like what other files I should look into. Just in case, it's ayimtour.com - I'm talking about.

#6 0zz

0zz

    Etomite Forum Fan

  • Member
  • Pip
  • 86 posts

Posted 11 April 2012 - 02:27 PM

Well, the good news is that the problem is solved. Thank you, Ralph!

It seems like the problem was in parser and snippets (Random Image). However, as I understand, we'll have wait for official updates, which, I believe, are coming soon in order to have stable release for future installations..

Thanks once again! Welcome to ayimtour.com )

#7 cathode

cathode

    Loves Etomite Forums!

  • Staff
  • 663 posts

Posted 31 May 2012 - 02:06 PM

I ran into this last night.

The fix is:

Replace line 18 with this:
if ($file != "." && $file != ".." && (preg_match("/.jpg/", $file) || preg_match("/.gif/", $file))) $retVal[count($retVal)] = $file;





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users