Edit report at http://bugs.php.net/bug.php?id=53535&edit=1
ID: 53535 Updated by: [email protected] Reported by: [email protected] 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] [email protected] 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
