#32967 [NEW]: The never ending bug with __FILE__
| From: | oskar-phpbug at eyb dot de | Date: | Fri, 06 May 2005 16:02:16 +0000 |
| Subject: | #32967 [NEW]: The never ending bug with __FILE__ | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-78716@lists.php.net to get a copy of this message | ||
From: oskar-phpbug at eyb dot de
Operating system: FreeBSD 5.3
PHP version: 5.0.4
PHP Bug Type: Scripting Engine problem
Bug description: The never ending bug with __FILE__
Description:
------------
It seems a never fixed problem with __FILE__
It looks like this description:
http://bugs.php.net/bug.php?id=13936
After I updatetd because this bug from PHP 4.3.11 to 5.0.4, unfortunately,
there is the same problem.
I would be very grateful if this can be fixed now.
Reproduce code:
---------------
In install/steps/SystemChecksStep.class of the Gallery2 - Distribution
there is the following code of interest:
function CheckFileDirective() {
if (strstr(__FILE__, 'install/steps/SystemChecksStep.class') ||
strstr(__FILE__, '\\install\\steps\\SystemChecksStep.class')) {
return true;
} else {
return false;
}
}
Expected result:
----------------
__FILE__ should return the full path, that is the absolute path, of the
file where it's called in.
__FILE__ returning a relative path is a known php problem and should have
been fixed by now.
it seems that PHP couldn't fix it for all system, i.e. obviously it
doesn't work on your freebsd machine.
Actual result:
--------------
If I write above the if (...)
die('__FILE__ = ' . __FILE__);
then in the browser appears
__FILE__ = ./steps/SystemChecksStep.class
--
Edit bug report at http://bugs.php.net/?id=32967&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32967&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32967&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32967&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32967&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32967&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32967&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32967&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32967&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32967&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32967&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=32967&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=32967&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32967&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32967&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32967&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32967&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32967&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32967&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32967&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32967&r=mysqlcfg