#33529 [Opn]: __FILE__ is relative while running Apache SAPI
| From: | ohill@php.net | Date: | Fri, 01 Jul 2005 03:31:20 +0000 |
| Subject: | #33529 [Opn]: __FILE__ is relative while running Apache SAPI | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-81252@lists.php.net to get a copy of this message | ||
ID: 33529
User updated by: ohill@php.net
Reported By: ohill@php.net
Status: Open
Bug Type: Scripting Engine problem
Operating System: Mac OS X
PHP Version: 4.3.11
New Comment:
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'
Previous Comments:
------------------------------------------------------------------------
[2005-07-01 05:25:08] ohill@php.net
Not working.
Still the same thing using a recent snapshot (4.4.0RC2)
------------------------------------------------------------------------
[2005-06-30 23:40:19] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2005-06-30 22:56:48] ohill@php.net
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