Closed GoogleCodeExporter closed 9 years ago
Updating a WordPress theme to run version 2.8.2 (currently running 2.8 which
works) and it wasn't working, no cached images saved to the cache folder on my
develepment PC.
Appears I had the same issue (the fix worked) on a Localhost development server
(using Wampserver) running under Windows Vista.
Not tested on a live site yet.
David
Original comment by regionbe...@seo-gold.com
on 27 Oct 2011 at 1:31
where do i have to put the line: $real = str_replace( "\\" , "/" , $real); ?
i've tried this but it didn't worked... :/
//Try src under docRoot
if(file_exists ($this->docRoot . '/' . $src)) {
$this->debug(3, "Found file as " . $this->docRoot . '/' . $src);
$real = realpath($this->docRoot . '/' . $src);
if(stripos($real, $realDocRoot) === 0){
return $real;
$real = str_replace( "\\" , "/" , $real);
} else {
$this->debug(1, "Security block: The file specified occurs outside the document root.");
//allow search to continue
}
}
Original comment by michelem...@gmail.com
on 28 Nov 2011 at 10:32
//Try src under docRoot
if(file_exists ($this->docRoot . '/' . $src)) {
$this->debug(3, "Found file as " . $this->docRoot . '/' . $src);
$real = realpath($this->docRoot . '/' . $src);
$real = str_replace( "\\" , "/" , $real);
if(stripos($real, $this->docRoot) === 0){
return $real;
} else {
$this->debug(1, "Security block: The file specified occurs outside the document root.");
//allow search to continue
}
}
Original comment by danc...@gmail.com
on 28 Nov 2011 at 10:39
[deleted comment]
[deleted comment]
I have just done fix for timthumb v 8.9 :
Just put this below two line on line #863 :
-----------------------------------------------------------------
$arr_docroot_path = explode("/wp-content/",$_SERVER["SCRIPT_FILENAME"]);
$this->docRoot = $arr_docroot_path[0];
-------------------------------------------------------------------
if(file_exists ($this->docRoot . '/' . $src)) { #863
It will fix the issue.
Find the attached fixed version of file.
Original comment by kumar.sh...@gmail.com
on 2 Mar 2012 at 7:29
Attachments:
The script is not a WordPress plugin so adding fixes specific to WordPress will
not help everyone with this issue I am afraid.
Original comment by BinaryMoon
on 5 Mar 2012 at 7:29
Original comment by BinaryMoon
on 3 Dec 2012 at 10:23
I know my original fix works for non WordPress sites. Not tested with WordPress.
Original comment by danc...@gmail.com
on 4 Dec 2012 at 8:22
I have fixed this problem. After years of no solution I decided to take it upon
myself. The attached file will work on Windows systems the same as it will work
on Unix systems.
Less than 20 lines of code added for the fix, so execution times are unaffected.
Enjoy :)
- Dan
Original comment by mardan...@gmail.com
on 5 Aug 2015 at 9:28
Attachments:
Original issue reported on code.google.com by
danc...@gmail.com
on 26 Oct 2011 at 6:33