From:
Operating system: Windows XP
PHP version: 5.3.8
Package: Filesystem function related
Bug Type: Bug
Bug description:stream_resolve_include_path does not resolved path when drive
letter missing
Description:
------------
I've tested it under PHP 5.3.5 (I don't have the possibilty to test it
under new PHP 5.3 version sorry).
While I run PHPUnit 3.5.15 with --bootstrap feature, I found a problem only
with PHP 5.3, because PHPUnit implement if availale the
stream_resolve_include_path function.
Here are my tests :
1. forgotten the drive letter (c:) on the path I given to PHPUnit
--bootstrap
With a Xdebug Trace I got a stream_resolve_include_path return FALSE
1.1564 776408 ->
PHPUnit_Util_Filesystem::fileExistsInIncludePath($file =
'\\UwAmp\\www\\TODO\\PHP_Reflect_NS\\PHP\\Reflect\\Autoload.php')
C:\UwAmp\bin\php\php-5.3.5\PEAR\PHPUnit\Util\Fileloader.php:75
1.1565 776512 ->
function_exists('stream_resolve_include_path')
C:\UwAmp\bin\php\php-5.3.5\PEAR\PHPUnit\Util\Filesystem.php:135
>=> TRUE
1.1566 776440 ->
stream_resolve_include_path('\\UwAmp\\www\\TODO\\PHP_Reflect_NS\\PHP\\Reflect\\Autoload.php')
C:\UwAmp\bin\php\php-5.3.5\PEAR\PHPUnit\Util\Filesystem.php:136
>=> FALSE
>=> FALSE
2. do not forgot the drive letter (c:) on the path I given to PHPUnit
--bootstrap
With a Xdebug Trace I got a stream_resolve_include_path return STRING
1.1798 776416 ->
PHPUnit_Util_Filesystem::fileExistsInIncludePath($file =
'c:\\UwAmp\\www\\TODO\\PHP_Reflect_NS\\PHP\\Reflect\\Autoload.php')
C:\UwAmp\bin\php\php-5.3.5\PEAR\PHPUnit\Util\Fileloader.php:75
1.1799 776520 ->
function_exists('stream_resolve_include_path')
C:\UwAmp\bin\php\php-5.3.5\PEAR\PHPUnit\Util\Filesystem.php:135
>=> TRUE
1.1800 776448 ->
stream_resolve_include_path('c:\\UwAmp\\www\\TODO\\PHP_Reflect_NS\\PHP\\Reflect\\Autoload.php')
C:\UwAmp\bin\php\php-5.3.5\PEAR\PHPUnit\Util\Filesystem.php:136
>=>
'C:\\UwAmp\\www\\TODO\\PHP_Reflect_NS\\PHP\\Reflect\\Autoload.php'
>=>
'C:\\UwAmp\\www\\TODO\\PHP_Reflect_NS\\PHP\\Reflect\\Autoload.php'
As drive letter is not required on all file system operation, I think there
is a little problem on windows platform only !
Test script:
---------------
<?php
# case 1
stream_resolve_include_path('\\UwAmp\\www\\TODO\\PHP_Reflect_NS\\PHP\\Reflect\\Autoload.php');
# RETURN FALSE
# case 2
stream_resolve_include_path('c:\\UwAmp\\www\\TODO\\PHP_Reflect_NS\\PHP\\Reflect\\Autoload.php');
# RETURN C:\\UwAmp\\www\\TODO\\PHP_Reflect_NS\\PHP\\Reflect\\Autoload.php
Expected result:
----------------
Expect to return STRING on case 1
Actual result:
--------------
RETURN FALSE on case 1
--
Edit bug report at https://bugs.php.net/bug.php?id=60280&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=60280&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=60280&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=60280&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=60280&r=fixed
Fixed in SVN and need be documented:
https://bugs.php.net/fix.php?id=60280&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=60280&r=alreadyfixed
Need backtrace:
https://bugs.php.net/fix.php?id=60280&r=needtrace
Need Reproduce Script:
https://bugs.php.net/fix.php?id=60280&r=needscript
Try newer version:
https://bugs.php.net/fix.php?id=60280&r=oldversion
Not developer issue:
https://bugs.php.net/fix.php?id=60280&r=support
Expected behavior:
https://bugs.php.net/fix.php?id=60280&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=60280&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=60280&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=60280&r=globals
PHP 4 support discontinued:
https://bugs.php.net/fix.php?id=60280&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=60280&r=dst
IIS Stability:
https://bugs.php.net/fix.php?id=60280&r=isapi
Install GNU Sed:
https://bugs.php.net/fix.php?id=60280&r=gnused
Floating point limitations:
https://bugs.php.net/fix.php?id=60280&r=float
No Zend Extensions:
https://bugs.php.net/fix.php?id=60280&r=nozend
MySQL Configuration Error:
https://bugs.php.net/fix.php?id=60280&r=mysqlcfg