From:             
Operating system: ubuntu
PHP version:      5.3.8
Package:          Streams related
Bug Type:         Bug
Bug description:Wrong lock support detection for streams

Description:
------------
I have implemented my own stream that support locking (defined the function
stream_lock). 
when use: 
file_put_contents("sqlfile://www.pppoa.it/x", "", LOCK_EX);

I get this error: Exclusive locks may only be set for regular files

I've take a look into PHP_5_3/ext/standard/file.c,  and at line 620 there
is a check, that generates this error.

Few lines after, at line 635 there is a second check, for stream lock
support.
But these lines of code (635...) is newer reachable because all operations
on stream that require locking will stop on line 623.





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

Reply via email to