php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60280 stream_resolve_include_path does not resolved path when drive letter missing
Submitted: 2011-11-12 13:01 UTC Modified: 2020-11-29 04:22 UTC
From: pear at laurent-laville dot org Assigned: cmb (profile)
Status: No Feedback Package: Filesystem function related
PHP Version: 5.3.8 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
46 - 28 = ?
Subscribe to this entry?

 
 [2011-11-12 13:01 UTC] pear at laurent-laville dot org
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-11-18 15:22 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-11-18 15:22 UTC] cmb@php.net
Looks like this has been fixed in the meantime, or can you still
reproduce this with any of the actively supported PHP versions[1]?

[1] <https://www.php.net/supported-versions.php>
 [2020-11-29 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 05:01:28 2024 UTC