Edit report at https://bugs.php.net/bug.php?id=39485&edit=1
ID: 39485 Updated by: php-bugs@lists.php.net Reported by: v1d4l0k4 at gmail dot com Summary: mkdir() fails when pathname have space(s) on the final -Status: Feedback +Status: No Feedback Type: Bug Package: *Directory/Filesystem functions Operating System: Windows XP (Win32 only) PHP Version: 5.2.0 New Comment: 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 "Open". Thank you. Previous Comments: ------------------------------------------------------------------------ [2010-07-14 03:50:30] fel...@php.net Please try using this snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2006-11-29 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2006-11-21 21:03:31] tony2...@php.net Cannot reproduce: C:\>php -r "var_dump(mkdir('dirname '));" bool(true) ------------------------------------------------------------------------ [2006-11-13 04:29:24] v1d4l0k4 at gmail dot com Description: ------------ The 'mkdir' function doesn't function correctly on Windows when the pathname contain space(s) on the final. PHP returns a warning, and the directory isn't created: Warning: mkdir() [function.mkdir]: Invalid argument in X on line Y Temporary fix: use trim() on the pathname Besides, if the pathname contain space(s) on the start, the directory is created when couldn't even so (in accordance with the behavior of Windows Explorer). Reproduce code: --------------- <?php mkdir('pathname '); mkdir(' pathname'); ?> Expected result: ---------------- <?php mkdir('pathname '); // Succeeds, but trim() before, in accordance with the behavior of Windows Explorer mkdir(' pathname'); // Succeeds, but trim() before, in accordance with the behavior of Windows Explorer ?> Actual result: -------------- <?php mkdir('pathname '); // Fails mkdir(' pathname'); // Succeeds even not being recommended ?> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=39485&edit=1