ID: 33529 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Feedback Bug Type: Scripting Engine problem Operating System: Mac OS X PHP Version: 5CVS, 4CVS (2005-07-03) New Comment:
Can you explain me why I can't reproduce this on same Macosx version, same apache version and PHP 4.4.0 ?? (yes, I tested within a virtualhost and a subdir in it) Does your setup have some symlinks somewhere in the path? Previous Comments: ------------------------------------------------------------------------ [2005-07-03 01:58:32] [EMAIL PROTECTED] Yes, same result with 5.1.0-dev (indeed) ------------------------------------------------------------------------ [2005-07-02 15:45:37] [EMAIL PROTECTED] Does this happen with PHP 5.1-dev? http://snaps.php.net/php5-latest.tar.gz ------------------------------------------------------------------------ [2005-07-01 05:31:19] [EMAIL PROTECTED] If you try with 2 scripts: /index.php /something/index.php and /index.php contains print __FILE__ and /something/index.php contains include('../index.php'), if you point your browser to /index.php the content of __FILE__ is correct. If you try /something/index.php, __FILE__ will contains '../index.php' ------------------------------------------------------------------------ [2005-06-30 22:56:48] [EMAIL PROTECTED] Description: ------------ The content of the __FILE__ constant is relative while running through a Virtual Host on OS X. The bug is not seen while working with the CLI version or if the script is not in a VirtualHost directive. Configure is as follow (majorly taken from OS X compile flags): './configure' '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-apxs' '--enable-cli' '--with-zlib' '--with-xml' '--enable-exif' '--enable-ftp' '--enable-sockets' '--with-curl=/usr' '--with-config-file-path=/etc' '--sysconfdir=/private/etc' Apache is the one distributed with Tiger 10.4.1 (1.3.33). The same code runs fine on Linux and Windows with the same config (vhosts settings). Reproduce code: --------------- <?php print __FILE__; ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33529&edit=1