Pure PHP Upload 2 Support Product Page

Solved

Deprecated: Function eregi() is deprecated in

Reported 22 Oct 2010 09:49:17
7
have this problem
22 Oct 2010 09:49:17 Steve Copelin posted:
Having a little issue
Deprecated: Function eregi() is deprecated in
while using the php upload, google search says a db version issue and does show a few clues on how to fix it. Are there any updates to the extension?

Steve

Promoted Solutions

Replied 24 Oct 2011 09:24:44
Hello,

eregi() function is deprecated in PHP 5.3.

It can be substituted with preg_match() function.
There is a slight difference in using preg_match():
Wile eregi is used like:
if (!eregi("GP_upload=true", $_SERVER['QUERY_STRING'])) {

the preg_match() must be set like:
if (!preg_match("/GP_upload=true/i", $_SERVER['QUERY_STRING'])) {

Replies

Replied 21 Oct 2011 08:18:10
21 Oct 2011 08:18:10 Benjamin Webgoonie replied:
QuoteHaving a little issue
Deprecated: Function eregi() is deprecated in
while using the php upload, google search says a db version issue and does show a few clues on how to fix it. Are there any updates to the extension?

Steve


Im having the same issue and notice your answer has not been answered over a year now.
Replied 24 Oct 2011 09:24:44
24 Oct 2011 09:24:44 Miroslav Zografski replied:
Hello,

eregi() function is deprecated in PHP 5.3.

It can be substituted with preg_match() function.
There is a slight difference in using preg_match():
Wile eregi is used like:
if (!eregi("GP_upload=true", $_SERVER['QUERY_STRING'])) {

the preg_match() must be set like:
if (!preg_match("/GP_upload=true/i", $_SERVER['QUERY_STRING'])) {

Replied 17 Feb 2012 07:24:30
17 Feb 2012 07:24:30 Alvarez Frédéric replied:
Hi, why did you not update extension to fix this problem automatically regerding php release?

Fred
Replied 23 Jul 2012 19:52:11
23 Jul 2012 19:52:11 Jens Hummelt replied:
I have the same problem since month!!

Is it such a big problem to solve this "bug" with an update?
Replied 07 Aug 2012 02:54:34
07 Aug 2012 02:54:34 Chuck Borrelli replied:
You cannot say that this issue is solved if the extension is not updated. Preg_match has been around since php 4, so you should be able to update the extension.

Please do not mark this as solved... it is not
Replied 18 Aug 2012 11:38:19
18 Aug 2012 11:38:19 Chuck Borrelli replied:
Still not solved until you update the extension
Replied 03 Feb 2014 21:49:28
03 Feb 2014 21:49:28 Andy Simpson replied:
Though this is indicating that the problem is solved because we know what to change, its still annoying having to remember what needs changing when you may not use the extension everyday of the week.

Does anyone know which file it is within the installation that contains this line of code that could be changed until the time it may have to be re-installed for whatever reason. That way I and others are not having to remind ourselves of the fix all of the time its used. Thanks

Reply to this topic