Bug #53535 [Opn->Bgs]: fopen on SplFileObject fails on windows
| From: | johannes@php.net | Date: | Mon, 13 Dec 2010 11:46:02 +0000 |
| Subject: | Bug #53535 [Opn->Bgs]: fopen on SplFileObject fails on windows | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-156960@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53535&edit=1
ID: 53535
Updated by: johannes@php.net
Reported by: eyalt@php.net
Summary: fopen on SplFileObject fails on windows
-Status: Open
+Status: Bogus
Type: Bug
Package: SPL related
Operating System: Windows
PHP Version: 5.3.4
Block user comment: N
Private report: N
New Comment:
The : is invalid in the file name. Replace it with _ or something else
in the test and it should work :-)
http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx
Previous Comments:
------------------------------------------------------------------------
[2010-12-13 08:54:03] eyalt@php.net
Description:
------------
fopen on SplFileObject seems to fail on windows with an 'Invalid
argument' warning.
this bug causes the SplFileObject_fgetcsv_* tests to fail on windows.
It should be noted, that on the other hand:
<?php
$fp = new SplFileObject('fgetcsv.csv', 'w+');
$fp1 = fopen('fgetcsv.csv', 'w+');
does work ok.
Test script:
---------------
<?php
var_dump(fopen('SplFileObject::fgetcsv.csv', 'w+'));
Expected result:
----------------
resource(5) of type (stream)
Actual result:
--------------
Warning: fopen(SplFileObject::fgetcsv.csv): failed to open stream:
Invalid argument in C:\inetpub\wwwroot\scrap.php on line 2
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53535&edit=1