From:             ab
Operating system: Windows
PHP version:      5.4Git-2012-10-09 (Git)
Package:          *General Issues
Bug Type:         Bug
Bug description:ext\fileinfo\tests\bug61964.phpt fails

Description:
------------
As one can see from the diff, there a permissions warning. Tries to set the
full permissions didn't work, so I've debugged it. Here is the VS
backtrace

        php_fileinfo.dll!apprentice_map(magic_set * ms, magic * * magicp, 
unsigned
int * nmagicp, const char * fn) Line 2219       C
        php_fileinfo.dll!apprentice_1(magic_set * ms, const char * fn, int
action, mlist * mlist) Line 271 C
        php_fileinfo.dll!file_apprentice(magic_set * ms, const char * fn, int
action) Line 369        C
        php_fileinfo.dll!magic_load(magic_set * ms, const char * magicfile) Line
308     C
        php_fileinfo.dll!zif_finfo_open(int ht, _zval_struct * return_value,
_zval_struct * * return_value_ptr, _zval_struct * this_ptr, int
return_value_used, void * * * tsrm_ls) Line 345 C
        php5ts_debug.dll!zend_do_fcall_common_helper_SPEC(_zend_execute_data *
execute_data, void * * * tsrm_ls) Line 642      C
        php5ts_debug.dll!ZEND_DO_FCALL_SPEC_CONST_HANDLER(_zend_execute_data *
execute_data, void * * * tsrm_ls) Line 2236     C
        php5ts_debug.dll!execute(_zend_op_array * op_array, void * * * tsrm_ls)
Line 410        C
        php5ts_debug.dll!zend_execute_scriapts(int type, void * * * tsrm_ls,
_zval_struct * * retval, int file_count, ...) Line 1309 C
        php5ts_debug.dll!php_execute_script(_zend_file_handle * primary_file,
void * * * tsrm_ls) Line 2482   C
        php.exe!do_cli(int argc, char * * argv, void * * * tsrm_ls) Line 988    
C
        php.exe!main(int argc, char * * argv) Line 1364 C
        php.exe!__tmainCRTStartup() Line 582    C

The warning is produced by the finfo_open() when an existing directory is
passed as a magic path.

Expected result:
----------------
Test pass

Actual result:
--------------
003+ Warning:
finfo_open(C:\php-sdk\php54\vc9\x86\php-src\ext\fileinfo\tests\test-folder):
failed to open stream: Permission denied in
C:\php-sdk\php54\vc9\x86\php-src\ext\fileinfo\tests\bug61964.php on line
16
006- Notice: finfo_open(): Warning: offset `string' invalid in
%sbug61964.php on line %d
007-
008- Notice: finfo_open(): Warning: offset ` Core' invalid in
%sbug61964.php on line %d
008+ Warning:
finfo_open(C:\php-sdk\php54\vc9\x86\php-src\ext\fileinfo\tests\test-folder):
failed to open stream: Permission denied in
C:\php-sdk\php54\vc9\x86\php-src\ext\fileinfo\tests\bug61964.php on line
30
009+ DONE: testing dir with files
010+ ===DONE===
009-
010- Notice: finfo_open(): Warning: type `Core' invalid in %sbug61964.php
on line %d
011-
012- Notice: finfo_open(): Warning: offset `a' invalid in %sbug61964.php on
line %d
013-
014- Notice: finfo_open(): Warning: type `a' invalid in %sbug61964.php on
line %d
015-
016- Notice: finfo_open(): Warning: offset `b' invalid in %sbug61964.php on
line %d
017-
018- Notice: finfo_open(): Warning: type `b' invalid in %sbug61964.php on
line %d
019-
020- Warning: finfo_open(): Failed to load magic database at
'%stest-folder'. in %sbug61964.php on line %d
021- DONE: testing dir with files
022- ===DONE===

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

Reply via email to