ID:               33529
 User updated by:  [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 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] [EMAIL PROTECTED]

Not working.

Still the same thing using a recent snapshot (4.4.0RC2)

------------------------------------------------------------------------

[2005-06-30 23:40:19] [EMAIL PROTECTED]

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] [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

Reply via email to