PHP __FILE__ Directive Is Not Working Correctly, What Can I Do?


PHP __FILE__ Directive Is Not Working Correctly, What Can I Do?
  Forums Index
      » PHP Forums
        » » PHP __FILE__ directive is not working correctly, what can I do?



PHP __FILE__ Directive Is Not Working Correctly, What Can I Do?
Post Description:
Post Tags: php, file, directive, is, not, working, correctly, what, can, i, do, free php support, php scripts, php questions, php answers, programming, codes, scripts
This Post Has Been Viewed 627 Times Since Mon Nov 06, 2006 10:46 pm Posted By bigger_travis with 1 replies
Next Post »» Getting "ERROR_LOCK_TIMEOUT" Error Message, What Do Can Should I Do?
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.

Leave Your Comments
* Your Name

  * Your Email Address (Will Not Be Published)

* Your Comments


Add Picture To Comments
Yes No             upload
Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

     




Comments and replies About PHP __FILE__ Directive Is Not Working Correctly, What Can I Do?






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