PHP __FILE__ directive is not working correctly, what can I do?

RegisterLogin
PHP __FILE__ directive is not working correctly, what can I do?
Post Description: PHP __FILE__ directive is not working correctly, what can I do?
Tags: PHP, __FILE__, directive, is, not, working, correctly,, what, can, I, do?
This Post Was Posted On Feb 29, 2008 By bigger_travis #1180
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.
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
bigger_travis
#1616 1
I had a customer that was hoting a site with a web host, they wouldn't upgrade their php, so i had the customer changed to www.webune.com, now their gallery works great.

Here is the link their gallery being hosted by www.webune.com:

http://www.overimage.com
Dec 01, 2006 Reply Report abuse
©2011 Webune Forums - Tue Dec 20, 2011 11:20 am
Powered by: Webune Forums V3