meghlal / timthumb

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

No images displaying on localhost (xampp) - Fine on server - HELP! #130

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. No thumbnail images displayed on the homepage on localhost
2. Can see the "working" site here: http://client.missmonkee.com/johntsagaris
user: client-login
pass: cl1entpassw0rd

What is the expected output? What do you see instead?
Localhost running xampp - I see no images and need to see them
Dedicated web Server - I see images

What version of the product are you using? On what operating system?
Running OXS 10.6.4
timthumb -  r101 from Nov 07 (1.16)
Xampp - for Mac OS X 1.7.3
PHP Version: 5.3.1
GD - bundled (2.0.34 compatible)

Please provide any additional information below.

I've made sure all permissions are set correctly tried Chmod 777 & 755. 
Tried the temp folder INSIDE the cache folder and in the same level in 
includes. (conflicting arguments on the web for that one)
Can access timthumb.php directly with no errors: response: 
no image specified
Query String : 
TimThumb version : 1.16
Can access the images directly using absolute path in browser. 
Can give you access to my machine using teamviewer if needed.

Its driving me nuts... I'm sure there is a simple explanation but it's very 
annoying. Can anyone help? :) 

Original issue reported on code.google.com by mel.miss...@gmail.com on 9 Nov 2010 at 10:26

GoogleCodeExporter commented 9 years ago
did you work this out? What page are you seeing the problems on? All the pages 
I tried are working as expected.

Original comment by BinaryMoon on 26 Nov 2010 at 11:53

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I had this issue in a machine running ubuntu. I replaced this code:

    // check for unix servers
    if (file_exists ($_SERVER['DOCUMENT_ROOT'] . '/' . $src)) {
        return $_SERVER['DOCUMENT_ROOT'];
    }

With this code:

   // check for unix servers
    if (file_exists (dirname(__FILE__) . '/' . $src)) {
        return dirname(__FILE__);
    }

For more info about dirname(__FILE__) see : 
http://php.net/manual/en/function.dirname.php

Original comment by martinlo...@gmail.com on 4 May 2011 at 6:39

GoogleCodeExporter commented 9 years ago
I had the exact same issue on my local server running XAMPP 1.7.3 under Windows 
7 Ultimate 64 bit. No images locally, but fine on staging server. My GD library 
version is 2.0.34 "compatible" whatever compatible means. I've found that the 
following statement is always negative, 

if (function_exists('imagefilter') && defined('IMG_FILTER_NEGATE'))

therefore it never executes. Any solution for this? Since it works on the 
staging server it is not that critical, but unnerving. Would be nice to see a 
fix.

Original comment by TheROIGu...@gmail.com on 30 Jun 2011 at 12:16

GoogleCodeExporter commented 9 years ago
i have same problem in localhost xammp. but my system says:

Warning: Cannot modify header information - headers already sent by (output 
started at D:\xammp\xampplite\htdocs\timthumb.php:1) in 
D:\xammp\xampplite\htdocs\timthumb.php on line 553

Warning: Cannot modify header information - headers already sent by (output 
started at D:\xammp\xampplite\htdocs\timthumb.php:1) in 
D:\xammp\xampplite\htdocs\timthumb.php on line 554

Warning: Cannot modify header information - headers already sent by (output 
started at D:\xammp\xampplite\htdocs\timthumb.php:1) in 
D:\xammp\xampplite\htdocs\timthumb.php on line 555

Warning: Cannot modify header information - headers already sent by (output 
started at D:\xammp\xampplite\htdocs\timthumb.php:1) in 
D:\xammp\xampplite\htdocs\timthumb.php on line 556

Warning: Cannot modify header information - headers already sent by (output 
started at D:\xammp\xampplite\htdocs\timthumb.php:1) in 
D:\xammp\xampplite\htdocs\timthumb.php on line 557

Warning: Cannot modify header information - headers already sent by (output 
started at D:\xammp\xampplite\htdocs\timthumb.php:1) in 
D:\xammp\xampplite\htdocs\timthumb.php on line 558

i add "ob_start()" at beginning and "ob_end_flush()" but error is continues...

what must i do?

Original comment by bvi...@gmail.com on 11 Jul 2011 at 3:28

GoogleCodeExporter commented 9 years ago
I have never been able to get timthumb to work on a localhost.  Xampp, Wamp, or 
otherwise.

Original comment by daveneth...@gmail.com on 13 Jul 2011 at 3:38

GoogleCodeExporter commented 9 years ago
Try it now. Looks like some servers combine STDOUT and STDERR and if there are 
any php warnings in timthumb it gives you this error. I've removed and fixed 
many of these issues that cause warnings, so please try the latest code and it 
should work. Closing this for now.

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

GoogleCodeExporter commented 9 years ago
Hi, I am having the same issue with version 2.8.5 on Xampp local

Original comment by rick...@gmail.com on 31 Jan 2012 at 12:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
in this function
protected function calcDocRoot(){ // line 816

*add* var_dump($_SERVER['DOCUMENT_ROOT']); to check your local path
example: D:/SVN-Homes/PHP/trunk/myprojectfolder
*delete* var_dump($_SERVER['DOCUMENT_ROOT']);

*add in line 817* if(preg_match('/SVN/', 
$_SERVER['DOCUMENT_ROOT']))define('LOCAL_FILE_BASE_DIRECTORY', './');

I used SVN in my case, but you have to define your own identifier

This worked for me!!

Original comment by luy...@gmail.com on 27 Feb 2012 at 11:05

GoogleCodeExporter commented 9 years ago
si pones la ruta absoluta de la imagen funciona en localhost:
ej:

timthumb.php?src=http://www.sitio_web.cl/img/prueba.jpg

saludos

Original comment by pancho...@gmail.com on 21 Apr 2012 at 2:09

GoogleCodeExporter commented 9 years ago
o 
timthumb.php?src=http://localhost/img/prueba.jpg

Original comment by pancho...@gmail.com on 21 Apr 2012 at 2:27

GoogleCodeExporter commented 9 years ago
@luy
could you please explain why you set to './' the LOCAL_FILE_BASE_DIRECTORY?
This isn't working for me :(
I have my project index stored under c:\wamp\www\MYPROJECTNAME\web\

Thank for any help.

Original comment by alessand...@gmail.com on 30 Apr 2012 at 11:13