|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2021-08-23 17:00 UTC] cmb@php.net
 
-Status:      Open
+Status:      Closed
-Assigned To:
+Assigned To: cmb
  [2021-08-23 17:00 UTC] cmb@php.net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 18:00:01 2025 UTC | 
Description: ------------ mkdir does parse :// in argument as schema/protocol and truncates the string resulting in wrong directory being created. Possibly more functions affected (fopen, ...). mkdir("/var/tmp/http://foobar", 0700, true); mkdir("/var/tmp/abcd://barbaz", 0700, true); Creates wrong directories. Test script: --------------- % find foobar /var/tmp/http: find: `foobar': No such file or directory find: `/var/tmp/http:': No such file or directory % ~/php546/bin/php -r 'var_dump(mkdir("/var/tmp/http://foobar", 0700, true));' bool(true) % find foobar /var/tmp/http: foobar find: `/var/tmp/http:': No such file or directory ==> PHP created directory 'foobar' in current working directory Expected result: ---------------- directory "/var/tmp/http:" is created directory "/var/tmp/http:/foobar" is created like gnu mkdir: % mkdir -p "/var/tmp/http://foobar" % find /var/tmp/http: /var/tmp/http: /var/tmp/http:/foobar Actual result: -------------- directory "foobar" is created in current working directory