Edit report at https://bugs.php.net/bug.php?id=62917&edit=1
ID: 62917 Updated by: [email protected] Reported by: matthew at slyman dot org Summary: require() fails depending on PHP filename (includes ASCII 'µ' character) -Status: Open +Status: Duplicate Type: Bug Package: Filesystem function related Operating System: Windows 7 PHP Version: 5.4.6 Block user comment: N Private report: N New Comment: This is a known issue. See this mailing list thread: http://www.mail-archive.com/[email protected]/msg60391.html (and this bug is also related: https://bugs.php.net/bug.php?id=47096). Basically it comes down to: Don't use Unicode filenames, at least not if you need Windows compat. In http://www.mail-archive.com/[email protected]/msg60446.html Pierre says that this is planned to be resolved for php-next+1. Previous Comments: ------------------------------------------------------------------------ [2012-08-24 04:11:33] matthew at slyman dot org This is an issue, partly because object/function names are permitted to have symbols like "µ", and the object class autoloading system permits files to be required automatically (where for example filename is identical to class name defined in the PHP file). I haven't tested the autoloading system yet but it would be nice to be able to include/require this file using traditional methods at this point, and retain the convenient/logical class/file name "µtime" for futureproofing. ------------------------------------------------------------------------ [2012-08-24 04:04:52] matthew at slyman dot org Description: ------------ --- >From manual page: http://www.php.net/function.require-once --- Where PHP filename includes "µ" character, for example; calling "require_once" on that file results in an error message (require fails). Similar paths/filenames without the special ASCII characters work under the same (Windows/XAMPP) installation, and identical paths/filenames including the special characters work under Linux. Test script: --------------- (Create a file called "microtime.php" and another file called "µTIME.php", and put them in the C:/ drive root folder, or some other place where PHP files may be included from.) ~~~ require_once('C:/microtime.php');//works require_once('C:/µTIME.php');//results in error message, but only under Windows. Expected result: ---------------- PHP file included. Actual result: -------------- ERROR MESSAGE: ~~~ Warning: require_once(C:/htdocs/[path_hidden]/µTIME.php): failed to open stream: No such file or directory in C:\htdocs\[path_hidden]\[filename_hidden].php on line ... ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62917&edit=1
