Bug #63248 [PATCH]: ext\fileinfo\tests\bug61964.phpt fails

From: Date: Wed, 10 Oct 2012 17:51:00 +0000
Subject: Bug #63248 [PATCH]: ext\fileinfo\tests\bug61964.phpt fails
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-173995@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63248&edit=1

 ID:                 63248
 Patch added by:     ab@php.net
 Reported by:        ab@php.net
 Summary:            ext\fileinfo\tests\bug61964.phpt fails
 Status:             Open
 Type:               Bug
 Package:            *General Issues
 Operating System:   Windows
 PHP Version:        5.4Git-2012-10-09 (Git)
 Block user comment: N
 Private report:     N

 New Comment:

The following patch has been added/updated:

Patch Name: bug63248.patch
Revision:   1349891460
URL:        https://bugs.php.net/patch-display.php?bug=63248&patch=bug63248.patch&revision=1349891460


Previous Comments:
------------------------------------------------------------------------
[2012-10-09 14:45:05] ab@php.net

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 this bug report at https://bugs.php.net/bug.php?id=63248&edit=1


Thread (13 messages)

« previous php.bugs (#173995) next »