Jump to content



Photo
- - - - -

Deprecated: Function eregi() is deprecated


This topic has been archived. This means that you cannot reply to this topic.
9 replies to this topic

#1   bhanu2217

bhanu2217
  • Members
  • 7 posts

Posted 04 October 2010 - 09:20

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

Edited by bhanu2217, 04 October 2010 - 09:21.


#2   germ

germ
  • Members
  • 13,921 posts

Posted 04 October 2010 - 10:41

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 suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#3   bhanu2217

bhanu2217
  • Members
  • 7 posts

Posted 04 October 2010 - 12:00

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

#4   Rob1962

Rob1962
  • Members
  • 63 posts

Posted 04 October 2010 - 13:13

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

#5   Rob1962

Rob1962
  • Members
  • 63 posts

Posted 06 October 2010 - 10:43

Hi

The contri that solves this is called : osCommerce_RC2a_PHP_5.3


If you type this in search it will pop up.

Rob

#6   bhanu2217

bhanu2217
  • Members
  • 7 posts

Posted 07 October 2010 - 06:09

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

Edited by bhanu2217, 07 October 2010 - 06:16.


#7   web-project

web-project
  • Members
  • 4,320 posts

Posted 07 October 2010 - 06:21

simply read the following topic: http://forums.oscomm...-is-deprecated/
so many times this issue has been discussed.
Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!
8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.
Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.
Any issues with oscommerce, I am here to help you.

#8   bhanu2217

bhanu2217
  • Members
  • 7 posts

Posted 08 October 2010 - 11:09

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

Edited by bhanu2217, 08 October 2010 - 11:10.


#9   MrPhil

MrPhil
  • Members
  • 5,197 posts

Posted 08 October 2010 - 19:28

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.

#10   bhanu2217

bhanu2217
  • Members
  • 7 posts

Posted 09 October 2010 - 06:49

Thank You. Problem solved.