onlaught Posted July 2, 2011 Share Posted July 2, 2011 I'm using xampp and wordpress. But when I activate the new themes "Comvy_v1.2" the thumbnail images not show. the error in phpThmb.php. Deprecated: Function eregi() is deprecated in C:\xampp\htdocs\ How should I do to solve this error? Quote Link to comment https://forums.phpfreaks.com/topic/240963-help-me-please-eregi/ Share on other sites More sharing options...
.josh Posted July 2, 2011 Share Posted July 2, 2011 the posix regix functions (like eregi) are deprecated. You need to use preg_match instead. If you can find the line of code that uses eregi() and post that line of code, we can give you the preg_match() equivalent. Quote Link to comment https://forums.phpfreaks.com/topic/240963-help-me-please-eregi/#findComment-1237699 Share on other sites More sharing options...
onlaught Posted July 2, 2011 Author Share Posted July 2, 2011 if (!eregi('password|mysql', $key)) . !eregi or eregi that I must change ? Quote Link to comment https://forums.phpfreaks.com/topic/240963-help-me-please-eregi/#findComment-1237707 Share on other sites More sharing options...
onlaught Posted July 2, 2011 Author Share Posted July 2, 2011 the posix regix functions (like eregi) are deprecated. You need to use preg_match instead. If you can find the line of code that uses eregi() and post that line of code, we can give you the preg_match() equivalent. Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in C:\xampp\htdocs\fbstat\wp-content\themes\comvy_v1.2\scripts\phpThumb\phpThumb.php on line 152 Quote Link to comment https://forums.phpfreaks.com/topic/240963-help-me-please-eregi/#findComment-1237708 Share on other sites More sharing options...
.josh Posted July 2, 2011 Share Posted July 2, 2011 if (!preg_match('~password|mysql~i', $key)) . Though there are a couple other differences, basically the main two differences between the posix functions (ereg ones) and pcre functions (preg_xxx) are 1) You need a delimiter around your pattern. You can use pretty much any non-alphanumeric character. In my code above, I use ~ 2) preg_xxx functions do not have separate functions for case-sensitivity. Instead, you use a modifier, which comes after the ending delimiter. Since eregi is case-insensitive, I added the 'i' modifier. Quote Link to comment https://forums.phpfreaks.com/topic/240963-help-me-please-eregi/#findComment-1237739 Share on other sites More sharing options...
onlaught Posted July 4, 2011 Author Share Posted July 4, 2011 if (!preg_match('~password|mysql~i', $key)) . Though there are a couple other differences, basically the main two differences between the posix functions (ereg ones) and pcre functions (preg_xxx) are 1) You need a delimiter around your pattern. You can use pretty much any non-alphanumeric character. In my code above, I use ~ 2) preg_xxx functions do not have separate functions for case-sensitivity. Instead, you use a modifier, which comes after the ending delimiter. Since eregi is case-insensitive, I added the 'i' modifier. thank u so much .. Quote Link to comment https://forums.phpfreaks.com/topic/240963-help-me-please-eregi/#findComment-1238028 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.