From:             
Operating system: Ubuntu Server 12.04
PHP version:      5.4.2
Package:          HTTP related
Bug Type:         Bug
Bug description:CURLOPT_COOKIEFILE '' raises open_basedir restriction

Description:
------------
Hello,

When setting CURLOPT_COOKIEFILE, I am finding that '' is raising the
error:

Warning: curl_setopt_array(): open_basedir restriction in effect. File() is
not within the allowed path(s): (/opt/www/:/usr/local/php/)

This suggests it is checking the string '' against open_basedir.
The documentation for CURLOPT_COOKIEFILE says:

"If the name is an empty string, no cookies are loaded, but cookie handling
is still enabled."

I was told in FreeNode #php that '' actually uses a temporary file.
If this is true, it should be performing the check after it has chosen a
temporary filename.

So essentially the bug I am reporting is that the order of these two checks
is switched. As it stands, CURLOPT_COOKIEFILE '' is useless with
open_basedir enabled.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=61948&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=61948&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=61948&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=61948&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=61948&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=61948&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=61948&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=61948&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=61948&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=61948&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=61948&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=61948&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=61948&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=61948&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=61948&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=61948&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=61948&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=61948&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=61948&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=61948&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=61948&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=61948&r=mysqlcfg

Reply via email to