|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-02-10 19:27 UTC] kasper at webmasteren dot eu
Description:
------------
Tested under PHP version 5.3.8 and 5.3.9, both running xdebug and a lot of other
standard plugins.
The problem is for some reason that PHP simply cannot create / open a file named
"../api/cache/con.js" which seems rather strange,since there is no keywords
(from what i could find) there would even suggest that it could be the reason.
i have used the software packet called "wamp".
Configuration line:
cscript /nologo configure.js "--enable-snapshot-build" "--with-pdo-oci=C:\php-
sdk\php53dev\vc9\x64\deps\instantclient_10_2\sdk,shared" "--with-oci8=C:\php-
sdk\php53dev\vc9\x64\deps\instantclient_10_2\sdk,shared" "--with-oci8-
11g=C:\php-sdk\php53dev\vc9\x64\deps\instantclient_11_2\sdk,shared" "--disable-
debug-pack" "--disable-static-analyze"
the version API:
API20090626,TS,VC9
The test script:
inside af subfolder, on a webserver, put this, and make sure that ../api/cache
folder exists.
futher more, when using the SplFileInfo the method "getType" tells me that it is
a file. the method "getAbsolutePath" returns "c:\wamp\www\api\cache\CON" and the
"getFileName" returns "CON.js".
Test script:
---------------
fopen("../api/cache/con.js","w");
Expected result:
----------------
Warning: fopen(../api/cache/con.js) [function.fopen]: failed to open stream: Bad
file descriptor in C:\wamp\www\teater\indexa.php on line 3
Actual result:
--------------
Warning: fopen(../api/cache/con.js) [function.fopen]: failed to open stream: Bad
file descriptor in C:\wamp\www\teater\indexa.php on line 3
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 04:00:01 2025 UTC |
Sadly this is a Windows limitation. On Windows you cannot create a file named "con", "aux", "prn", or "nul", regardless of case. They are reserved device names that exist for historical reasons ("con" for example is the stdin/stdout). For some mad reason, this limitation still applies regardless of the file extension!! Try simply in Notepad to save a file called con.txt and it'll fail just the same.