#33529 [Com]: __FILE__ is relative while running Apache SAPI
| From: | romaninsh at gmail dot com | Date: | Wed, 05 Apr 2006 14:53:32 +0000 |
| Subject: | #33529 [Com]: __FILE__ is relative while running Apache SAPI | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-95349@lists.php.net to get a copy of this message | ||
ID: 33529
Comment by: romaninsh at gmail dot com
Reported By: ohill@php.net
Status: No Feedback
Bug Type: Scripting Engine problem
Operating System: Mac OS X
PHP Version: 5CVS, 4CVS (2005-07-03)
New Comment:
I am experiencing the same thing (see also bug #27823 which
look like a same issue)
a.php:
<?
echo "<pre>";
var_dump(__FILE__);
include"b.php";
b.php:
<?
var_dump(__FILE__);
output:
string(31) "/Users/r/Sites/a.php"
string(7) "./b.php"
expected:
string(31) "/Users/r/Sites/a.php"
string(31) "/Users/r/Sites/b.php"
URL opened:
http://localhost/a.php
httpd.conf:
DocumentRoot "/Users/r/Sites"
php version:
php-5.1.2
mac os x (intel)
php configure string:
'./configure' \
'--with-xml' \
'--with-zlib' \
'--with-gd' \
'--with-jpeg-dir=/sw' \
'--with-png-dir=/sw' \
'--with-apxs=/usr/sbin/apxs' \
'--with-mysql' \
'--with-mysql=/usr/local/mysql'
I AM USING NON-CVS version. I'm going to upgrade NOW and
will report if it solves the problem.
Previous Comments:
------------------------------------------------------------------------
[2005-08-31 01:00:04] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2005-08-23 02:27:17] sniper@php.net
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?
------------------------------------------------------------------------
[2005-07-03 01:58:32] ohill@php.net
Yes, same result with 5.1.0-dev (indeed)
------------------------------------------------------------------------
[2005-07-02 15:45:37] sniper@php.net
Does this happen with PHP 5.1-dev?
http://snaps.php.net/php5-latest.tar.gz
------------------------------------------------------------------------
[2005-07-01 05:31:19] ohill@php.net
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'
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/33529
--
Edit this bug report at http://bugs.php.net/?id=33529&edit=1