Latest News: (loading..)

Archived

This topic is now archived and is closed to further replies.

bhanu2217

Deprecated: Function eregi() is deprecated

10 posts in this topic

I am using wamp server on windows 7

 

I am getting following error

 

Deprecated: Function eregi() is deprecated when i open the catalog

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Warning: I am able to write to the configuration file: C:/wamp/www/jewels/catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file.

I checked the file, it has read and write permission

 

Version: osCommerce Online Merchant v2.2 Release Candidate 2a

Php: 5.3.0

mySQL: 5.1.36

Share this post


Link to post
Share on other sites

Use Windowz explorer to make the config file "read only".

 

That solves that problem.

 

If you search the forum there are many posts about how to fix the deprecated function error.

Share this post


Link to post
Share on other sites

Use Windowz explorer to make the config file "read only".

 

That solves that problem.

 

If you search the forum there are many posts about how to fix the deprecated function error.

 

If i do this.

This error gets resolved

 

Warning: I am able to write to the configuration file: C:/wamp/www/jewels/catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file

 

but i am still getting following errors

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\jewels\catalog\includes\classes\language.php on line 87

Share this post


Link to post
Share on other sites

That is what he said.

 

If you put : deprecated function in the search box and hit enter you will find a lot of info.

 

There is also a contribution for this that takes care of most "deprecated errors" , just use the search box

Share this post


Link to post
Share on other sites

Hi

 

The contri that solves this is called : osCommerce_RC2a_PHP_5.3

 

 

If you type this in search it will pop up.

 

Rob

Share this post


Link to post
Share on other sites

I can't really seem to find what is the best solution for this problem. I am ASP.NET developer trying out PHP for change.

How do i get rid of deprecated errors? I also tried alpha 3 release if in that i get deprecated errors

 

If you can post some link it will be gr8.

 

Thanks

Share this post


Link to post
Share on other sites

I am still stuck up. I opened the file language.php and went to line 87

 

where it gives the error

if (eregi('^(' . $value . ')(;q=[0-9]\\.[0-9])?$', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) {

 

i replaced eregi with preg_match then i started getting these warnings.

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

 

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\osc\includes\classes\language.php on line 87

Share this post


Link to post
Share on other sites

Trim the damned list down to one entry and tell us (if necessary) that it repeated N times, rather than listing the whole thing!

 

Your error is that you screwed up the edit on line 87. preg_match's first argument needs delimiters around the pattern, such as /. You didn't add them. If this is the original line:

          if (eregi('^(' . $value . ')(;q=[0-9]\\.[0-9])?$', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) {

it needs to be changed to

          if (preg_match('/^(' . $value . ')(;q=[0-9]\\.[0-9])?$/i', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) {

This assumes that the $value string doesn't contain any slashes / itself. If it does, choose another delimiter such as # or ! that will not appear in the pattern.

bhanu2217 likes this

Share this post


Link to post
Share on other sites