|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-01-25 08:47 UTC] RQuadling@php.net
Description:
------------
Latest release fails to find files using file_exists.
2 different computers, both Windows XP SP2.
In both cases the allow_url_xxx settings are the same (the only thing I can think of which may affect this).
The code was run via the command line. Copying the PHP installation from the working machine to the non-working machine results in 2 working machines. The only files altered exist within C:\PHP5. No other settings or ini files have been altered between releases.
Reproduce code:
---------------
@echo off
echo Find file using normal DOS command.
echo ===================================
dir \\bandexch\bandvulcfaxesreceived\2007\01\25\2007-01-25__00-00__Page-0001__9FNM7E.tif
echo.
echo.
echo Report PHP Version.
echo ===================
php -v
echo.
echo.
echo Find the same file using PHP's file_exists command.
echo ===================================================
php -r "var_export(file_exists('\\\\bandexch\\bandvulcfaxesreceived\\2007\\01\\25\\2007-01-25__00-00__Page-0001__9FNM7E.tif'));"
Expected result:
----------------
Find file using normal DOS command.
===================================
Volume in drive \\bandexch\bandvulcfaxesreceived has no label.
Volume Serial Number is 94A0-8C6D
Directory of \\bandexch\bandvulcfaxesreceived\2007\01\25
25/01/2007 00:01 19,921 2007-01-25__00-00__Page-0001__9FNM7E.tif
1 File(s) 19,921 bytes
0 Dir(s) 34,604,453,888 bytes free
Report PHP Version.
===================
PHP 5.2.1RC3-dev (cli) (built: Jan 11 2007 16:24:41)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Zend Extension Manager v1.0.11, Copyright (c) 2003-2006, by Zend Technologies
with Zend Optimizer v3.2.0, Copyright (c) 1998-2006, by Zend Technologies
Report the state of allow_url_xxx
=================================
string(1) "1"
string(1) "0"
Find the same file using PHP's file_exists command.
===================================================
true
Actual result:
--------------
Find file using normal DOS command.
===================================
Volume in drive \\bandexch\bandvulcfaxesreceived has no label.
Volume Serial Number is 94A0-8C6D
Directory of \\bandexch\bandvulcfaxesreceived\2007\01\25
25/01/2007 00:01 19,921 2007-01-25__00-00__Page-0001__9FNM7E.tif
1 File(s) 19,921 bytes
0 Dir(s) 34,604,462,080 bytes free
Report PHP Version.
===================
PHP 5.2.1RC4-dev (cli) (built: Jan 25 2007 08:24:12)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Zend Extension Manager v1.0.11, Copyright (c) 2003-2006, by Zend Technologies
with Zend Optimizer v3.2.0, Copyright (c) 1998-2006, by Zend Technologies
Report the state of allow_url_xxx
=================================
string(1) "1"
string(1) "0"
Find the same file using PHP's file_exists command.
===================================================
false
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 05:00:01 2025 UTC |
\\bandexch is a windows server and is NOT the localhost. As a better proof of the problem. No config. allow_url_include and allow_url_fopen both set to 1. The command below is run in : D:\Personal Files\Software\PHP\V5.2.latest\php5.2-win32-latest (the snapshot for 5.2.1RC4-dev) and in C:\PHP5 (an RC3 snapshot from Jan 11th). php -n -d allow_url_include=1 -d allow_url_fopen=1 -r "var_dump(phpversion(), ini_get('allow_url_fopen'), ini_get('allow_url_include'), file_exists('\\\\bandexch\\bandvulcfaxesreceived\\2007\\01\\25\\2007-01-25__00-00__Page-0001__9FNM7E.tif'));" Output: string(12) "5.2.1RC4-dev" string(1) "1" string(1) "1" bool(false) and string(12) "5.2.1RC3-dev" string(1) "1" string(1) "1" bool(true) The no config bit is important as there is no Zend Optimizer running or any extensions. Same machine. Same security. Same user (me). I have admin rights to the LAN.Yes! Thanks. php -n -d allow_url_include=0 -d allow_url_fopen=0 -r "var_dump(phpversion(), ini_get('allow_url_fopen'), ini_get('allow_url_include'), file_exists('\\\\bandexch\\bandvulcfaxesreceived\\2007\\01\\25\\2007-01-25__00-00__Page-0001__9FNM7E.tif'));" outputs... string(12) "5.2.1RC5-dev" string(1) "0" string(1) "0" bool(true) As expected. Thanks again you wonderful people!