PHP __FILE__ Directive Is Not Working Correctly, What Can I Do?
php __file__ directive is not working correctly, what can i do?
php, file, directive, is, not, working, correctly, what, can, i, do
PHP __FILE__ Directive Is Not Working Correctly, What Can I Do?
Post Description: php __file__ directive is not working correctly, what can i do?
POST# 339
Posted On: Fri Feb 29, 2008 12:01 pm
bigger_travis
Topic: PHP __FILE__ Directive Is Not Working Correctly, What Can I Do?
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.


Fri Dec 01, 2006 12:40 pm
1
bigger_travis
Reply #937
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

What do you think?

* name:  

* email:  

* Please enter comments:


Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

Add image to comments
yes no             upload