Pure PHP Upload 2 Support Product Page

Solved

Deprecated: Function eregi() is deprecated in

Reported 14 years ago
7
have this problem
14 years ago 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 13 years ago
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 13 years ago
13 years ago 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 13 years ago
13 years ago 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 13 years ago
13 years ago Alvarez Frédéric replied:
Hi, why did you not update extension to fix this problem automatically regerding php release?

Fred
Replied 12 years ago
12 years ago Jens Hummelt replied:
I have the same problem since month!!

Is it such a big problem to solve this "bug" with an update?
Replied 12 years ago
12 years ago 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 12 years ago
12 years ago Chuck Borrelli replied:
Still not solved until you update the extension
Replied 11 years ago
11 years ago 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