From:             
Operating system: Linux Debian
PHP version:      5.2SVN-2010-10-28 (snap)
Package:          Filesystem function related
Bug Type:         Bug
Bug description:glob() always return empty array 

Description:
------------
test is simple:



print_r(glob("/var/www/*"));





Always returns empty array.

____________________________



Yes, I know this is strange, yes I have search whole web and no solution
yet.



Problem is probably related to OS, because other server (also linux lenny)
work OK on the same apache2 and same php5 module.



I have made simple command line test:



sudo -u www-data php5 -c /etc/php5/apache2/php.ini -r
'print_r(glob("/var/www/*"));'





And this is working OK.

My apache2 has no strange modules, this is normal web server.



My system:

php5:  5.2.6.dfsg.1-1+lenny9 

kernel: 2.6.8-2-386

libc6:  2.7-18lenny6 

apache: apache2  2.2.9-10+lenny8 



No special file system security on OS, /var/www is 777, default apache2
security settings.



This problem is VERY rare, but Im not the only one:



same problem here:

http://forums.gentoo.org/viewtopic-t-826894-start-0.html



Any suggestions?

PLEASE HELP!

Test script:
---------------
print_r(glob("/var/www/*"));

Expected result:
----------------
glob() should return array of files

Actual result:
--------------
empty array, no errors

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

Reply via email to