From:             dev at jkt dot wz dot cz
Operating system: all
PHP version:      4.3.10
PHP Bug Type:     MySQL related
Bug description:  strange fix of old mysql LOAD DATA LOCAL INFILE issue

Description:
------------
Hi, sorry for creating another useless bugreport, but I haven't ability to
comment bugs in CLOSED state.

[Considering bug reports #23779 and #28632 and mainly lines 601-604 in
ext/mysql/php_mysql.c]

/* disable local infile option for open_basedir */
if (PG(open_basedir) && strlen(PG(open_basedir)) && (client_flags &
CLIENT_LOCAL_FILES)) {
        client_flags ^= CLIENT_LOCAL_FILES;
}

Are you, PHP developers, sure that the approach "So, let's check bit 7.
Oh, it is set, uhm, so, let's read it, make a negation and the write it
back" the best way? Shouldn't be better (and also more elegant,
faster,...) to write something like:

if (PG(open_basedir) && strlen(open_basedir)) {
        client_flags &= ~CLIENT_LOCAL_FILES;
}


-- 
Edit bug report at http://bugs.php.net/?id=31261&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31261&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31261&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31261&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31261&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31261&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31261&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31261&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31261&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31261&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31261&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31261&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31261&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31261&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31261&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31261&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31261&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31261&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31261&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31261&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31261&r=mysqlcfg

Reply via email to