#45835 [Opn->Asn]: include_once ans symlinks

From: Date: Sat, 16 Aug 2008 20:23:00 +0000
Subject: #45835 [Opn->Asn]: include_once ans symlinks
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-128132@lists.php.net to get a copy of this message
ID: 45835 Updated by: bjori@php.net Reported By: hannes dot magnusson at gmail dot com -Status: Open +Status: Assigned Bug Type: CGI related Operating System: Ubuntu 8.04.1 PHP Version: 5.3CVS-2008-08-16 (snap) -Assigned To: +Assigned To: dmitry Previous Comments: ------------------------------------------------------------------------ [2008-08-16 20:22:29] hannes dot magnusson at gmail dot com Description: ------------ Looks like the new realpath() implementation is having issues with symlinks.. include_once with symlinks in the path, under lighttpd, is failing. Can't seem to reproduce this under cli. /www/bjori.php.is is a symlink to /www/local.php.net /www/local.php.net is then a symlink to /home/bjori/php/web Using the realpath of the file, or relative path, works fine. Reproduce code: --------------- bjori@lindsay:~/php/5.3$ cat config.nice #! /bin/sh # # Created by configure './configure' \ '--prefix=/home/bjori/.apps' \ '--enable-debug' \ '--with-zend-vm=GOTO' \ '--disable-all' \ '--without-pear' \ bjori@lindsay:~/php/web$ cat test.php <?php var_dump(file_exists("/www/bjori.php.is/test/inc.php")); include "/www/bjori.php.is/test/inc.php"; bjori@lindsay:~/php/web$ cat test/inc.php hello world Actual result: -------------- bool(true) Warning: include(/www/bjori.php.is/test/inc.php) [function.include]: failed to open stream: No such file or directory in /home/bjori/php/web/test.php on line 3 Sometimes: bool(true) Warning: include(/www/bjori.php.is/test/inc.php) [function.include]: failed to open stream: Success in /home/bjori/php/web/test.php on line 3 And even the occasional: Fatal error: Unknown: Failed opening required '' (include_path='.:') in Unknown on line 0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45835&edit=1

« previous php.bugs (#128132) next »