oseawey / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

get_document_root always returning "file not found" #163

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have tried last svn, in windows 7 + apache, and in linux + apache, with 
wordpress, both cases dont work, always return "file not found".
To fix this, I changed to include $_SERVER['DOCUMENT_ROOT'] in the test and in 
return, using a $filename as temporary variable:

    foreach ($parts as $part) {
        $path .= '/' . $part;
        $filename = $_SERVER['DOCUMENT_ROOT'] . $path . '/' . $src;
        if (file_exists ($filename)) {
//            return $path;
            return $_SERVER['DOCUMENT_ROOT'] . $path;
        }
    }

Original issue reported on code.google.com by hiddenat...@gmail.com on 14 Feb 2011 at 7:23

GoogleCodeExporter commented 9 years ago
I've reverted the code to the previous version. Could you try again and let me 
know if it works now?

Original comment by BinaryMoon on 14 Feb 2011 at 10:23

GoogleCodeExporter commented 9 years ago

Original comment by BinaryMoon on 14 Feb 2011 at 10:23

GoogleCodeExporter commented 9 years ago
Seems to be working again.
I'll give a try later with more tests, if anything wrong happen, I let you know.
Thank you for your support.

Original comment by hiddenat...@gmail.com on 15 Feb 2011 at 4:33