miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Bugs miniBB Support Forums / Bugs /  
 

Function eregi() is deprecated

 
Author manas
Partaker
#1 | Posted: 3 Jun 2010 04:52 
Paul,

I also found same error while login as new user: After clicking "Sign Up" button its asking username, passowrd, repeat password, email and all.

if I provide any raw data in the field I am getting warning:-

Error in user data: Security verifycation failed: entered passwords didn't match!

Along with top of the header I am getting error:-

Deprecated: Function eregi() is deprecated in C:\wamp\www\forums\bb_func_checkusr.php on line 27


In bb_func_checkusr.php file line no 27 code is as below:

elseif($act=='reg' and !eregi("^[A-Za-z0-9_]{5,32}$", ${$dbUserSheme['user_password'][1]})) $correct=2;


Please provide some input on this?

Author manas
Partaker
#2 | Posted: 3 Jun 2010 05:01 
If a new user after successful loged in I am getting message like:

Thank you very much for registering!
You are welcome to go to the forum homepage now and sign in immediately.
Return to the forums list

Along with getting error on the above the Header panel:-

Deprecated: Function eregi() is deprecated in C:\wamp\www\forums\bb_func_checkusr.php on line 27

Deprecated: Function eregi() is deprecated in C:\wamp\www\forums\bb_func_checkusr.php on line 30


Any chance to resolve this?

Author Paul
Lead Developer 
#3 | Posted: 3 Jun 2010 05:11 
manas:
Error in user data...
This is related to the miniBB internal routine checking. You must provide same passwords on registration. It's like a verification process.

Hmm, "Deprecated..." error is probably related to PHP 6. Which version of PHP are you using? I suppose it is 6.

Ok, it was planned for the next miniBB, but here is the code you may try to replace in bb_func_checkusr.php:

if ($action=='register' and (!preg_match($userRegExp,${$dbUserSheme['username'][1]}) or preg_match("#^[0-9]+$#", ${$dbUserSheme['username'][1]})) ) $correct=1;
elseif($act=='reg' and !preg_match("#^[A-Za-z0-9_]
{5,32}$#i", ${$dbUserSheme['user_password'][1]})) $correct=2;
elseif($act=='upd' and ${$dbUserSheme['user_password'][1]}!='' and !preg_match("#^[A-Za-z0-9_]
{5,32}$#i", ${$dbUserSheme['user_password'][1]})) $correct=2;
elseif(${$dbUserSheme['user_password'][1]}!=$passwd2) $correct=3;
elseif(!preg_match("#^[0-9a-z]+([._-][0-9a-z_]+)*_?@[0-9a-z]+([._-][0-9a-z]+)*[.][0-9a-z]{2}[0-9A-Z]?[0-9A-Z]?$#i", ${$dbUserSheme['user_email'][1]})) $correct=4;
elseif(isset($dbUserSheme['user_website']) and isset(${$dbUserSheme['user_website'][1]}) and ${$dbUserSheme['user_website'][1]}!='' and !preg_match("#^(f|ht)tp[s]?:\/\/[^<>]+$#i", ${$dbUserSheme['user_website'][1]})) $correct=6;
i.e. everywhere eregi should be replaced to preg_match with the proper extra syntax.

Please fix and let me know how it works. We will keep this upgrade for the next miniBB release.

P.S. It is fixed in miniBB 2.5.

Author manas
Partaker
#4 | Posted: 3 Jun 2010 05:19 
I am using php 5.3.0

Author manas
Partaker
#5 | Posted: 3 Jun 2010 05:25 
Its working. Thanks a lot Paul for help me on this.

Bugs miniBB Support Forums / Bugs /
 Function eregi() is deprecated
 Share Topic's Link

This topic is closed. New replies are not allowed.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑