oseawey / timthumb

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

function get_document_root returns 'file not found' again #166

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. configure php with empty val for doc_root (default value)
2. give DIRECTORY_CACHE a doc relative path, 'cache/images/'.
3.  put $path/$src into ~line 818 display_error ("file[$path/$src] not found");
2. run script from a few directories deep 
(localhost/folder/anotherfolder/timthumb.php) with a doc relative path for src, 
'media/images/image.jpg'.

What is the expected output? What do you see instead?
Expected image output. Instead 400 error, 'file not found'. 
function get_document_root returns a garbage path when called by clean_source 
around line 765, 'c:\inetpub\wwwroot/c:\inetpub\wwwroot\'.

What version of the product are you using? On what operating system?
1.2|winsvr 2k3

Please provide any additional information below.
Comment out call to get_document_root ($src) on line ~765 and the script works 
fine. You can't rely on a value being set for DOCUMENT_ROOT, it's blank by 
default.

Original issue reported on code.google.com by methula...@gmail.com on 25 Feb 2011 at 2:14

GoogleCodeExporter commented 9 years ago
Issue 137 has been merged into this issue.

Original comment by BinaryMoon on 20 Jun 2011 at 3:44

GoogleCodeExporter commented 9 years ago
The doc_root code has been rewritten and released. Please test again and file 
another bug if this is still valid.

Original comment by mmaun...@gmail.com on 7 Aug 2011 at 2:03