Bug #18172 Updated: Mysql_query function RLIKE and REGEXP
| From: | r dot denis at bell dot ca | Date: | Fri, 05 Jul 2002 13:57:12 +0000 |
| Subject: | Bug #18172 Updated: Mysql_query function RLIKE and REGEXP | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-13221@lists.php.net to get a copy of this message | ||
ID: 18172
Updated by: r.denis@bell.ca
Reported By: r.denis@bell.ca
-Status: Bogus
+Status: Open
Bug Type: MySQL related
Operating System: Freebsd/Linux
PHP Version: 4.2.1
New Comment:
# locate php.ini
/usr/local/etc/php.ini
/usr/local/etc/php.ini-dist
ruoc4k# grep -i register /usr/local/etc/php.ini
; This directive describes the order in which PHP registers GET, POST,
Cookie,
; Whether or not to register the EGPCS variables as global variables.
You may
; register_globals to be on; Using form variables as globals can
easily lead
register_globals = on
register_argc_argv = On
; autoregister constants of a components typlib on com_load()
;com.autoregister_typelib = true
; register constants casesensitive
;com.autoregister_casesensitive = false
;com.autoregister_verbose = true
Register locals was turned on because of the way some of the data was
being passed.
Previous Comments:
------------------------------------------------------------------------
[2002-07-05 03:55:10] mfischer@php.net
In PHP 4.2.0, the 'register_globals' setting default changed to
be off. See http://www.php.net/release_4_2_0.php
for more info.
We are sorry about the inconvenience, but this change was a necessary
part of our efforts to make PHP scripting more secure and portable.
------------------------------------------------------------------------
[2002-07-04 23:08:50] r.denis@bell.ca
I am not certain what the issue is however,
When mysql_query is called in the following manner it fails
to return all regexp occurances of the the given variable;
Both REGEXP and RLIKE fail!
$query2="select * from report WHERE users REGEXP '$zcntlogin'";
//$query2="select * from report WHERE users RLIKE '$zcntlogin'";
This is, or from my understanding should be the equivalent of
connecting to the
mysql server and executing the command:
select * from report WHERE users RLIKE 'firstname.lastname'; //which
works!
In my script $zcntlogin is set through pam_smbd and mod_auth_external
<?php
if (!isset($PHP_AUTH_USER) || !zcntlogin) {
header("WWW-Authenticate: Basic realm=\"Bell
Domain\"");
header("HTTP/1.0 401 Unauthorized");
echo "Text to send if user hits Cancel
button\n";
exit;
} else {
$zcntlogin =$PHP_AUTH_USER;
}
?>
Hopefully that helps.
Cheers,
Rob
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18172&edit=1