Bug #67690 [Fbk->Opn]: __DIR__ does not work with eacute

From: Date: Mon, 28 Jul 2014 06:21:59 +0000
Subject: Bug #67690 [Fbk->Opn]: __DIR__ does not work with eacute
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186834@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67690&edit=1 ID: 67690 User updated by: lingtalfi at gmail dot com Reported by: lingtalfi at gmail dot com Summary: __DIR__ does not work with eacute -Status: Feedback +Status: Open Type: Bug Package: Directory function related Operating System: MacOSX 10.5.8 PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Oh thank you. It turns out that the problem was apache httpd.conf encoding. I had a line like this in my virtual hosts: DocumentRoot "/Volumes/Macintosh HD 2/web/Komin>/service création/projets/doo" Pasting it from a text-editor in utf-8, it works well ($a===$b), however, pasting it from a text-editor in plain encoding makes it fail, although the exact same string appears in the text-editor window (I find this very confusing). Problem solved. Previous Comments: ------------------------------------------------------------------------ [2014-07-28 03:17:36] yohgaki@php.net Sounds like encoding/normalization issue. What's the content of $a and $b? i.e. var_dump(bin2hex($a), bin2hex($b)); ------------------------------------------------------------------------ [2014-07-27 07:59:18] lingtalfi at gmail dot com I'm using Apache/2.2.26 (Unix) PHP/5.5.8 Mac OsX 10.8.5 ------------------------------------------------------------------------ [2014-07-27 07:57:13] lingtalfi at gmail dot com Description: ------------ Let create 2 files in a folder with name "dir": - x.php - x2.php Let put the following content in x.php: require_once 'x2.php'; $a = __DIR__; var_dump($a === $b); and the following content in x2.php: $b = __DIR__; Let's open x.php in a browser, it outputs true. Let's now repeat the same steps but within a folder named "diré". The output is false (in my case). ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67690&edit=1

« previous php.bugs (#186834) next »