PHP __FILE__ Directive Is Not Working Correctly, What Can I Do?
- Forums
- PHP
- PHP __FILE__ Directive Is Not Working Correctly, What Can I Do?
This Page Contains information about PHP __FILE__ Directive Is Not Working Correctly, What Can I Do? By bigger_travis in category PHP with 1 Replies. [967], Last Updated: Sat May 18, 2024
bigger_travis
Mon Nov 06, 2006
1 Comments
1200 Visits
There are some gallery scripts that depends on PHP's __FILE__ directive to return the absolute filesystem path of the current file. Due to a bug in PHP, __FILE__ returns a relative path in older PHP versions.
* In most cases, you can fix the problem by convincing your webhost to upgrade the PHP version.
* For some rare platforms, the bug still exists in the latest PHP version. In this case you need to file a bug report for PHP such that the bug gets fixed for that platform too. E.g. PHP 4.4.4 on SunOS 5.8 returns the filename without any path if any of the parent folders of your Gallery folder is not readable by the webserver user.
Here is the link their gallery being hosted by www.webune.com:
http://www.overimage.com
https://www.wallpaperama.com/forums/php-file-directive-is-not-working-correctly-what-can-i-do-t454.html