palakmonad / timthumb

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

No image shown #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Using version 1.10+ , version 1.09 works fine (but have the large jpg 
problem)

What is the expected output? What do you see instead?
See image. I see broken images / no image.

What version of the product are you using? On what operating system?
1.10 - 1.11

Please provide any additional information below.
I tested to upgrade to latest version since it seems like a good idea and i 
want the official correct resize generation of .jpg-files. However when i 
use later versions since 1.09 it just doesn work.

Yes i have:
1. Created a folder named "cache" and made sure it is writable.
2. Created a folder inside "cache" named "temp" and made sure that is 
writeable.
3. Created a folder in main dir named "temp" as well and made.. (read 
above)
4. Tried 1.10b

_NOTE_: I'm currently using timthumb locally via WAMP-server. This may, or 
may not, have something to do or may interfer with the later versions since 
you have been introducing external use of timthumb etc(?)

My only option now seem to be to use an old version of 1.08b which is 
modified by a user to generate the smaller jpg-files. :f

This kinda suck all in all since i'm mainly using timthumb in a new theme 
and using a hacked 1.08 seems like quite a bad idea even though i haven't 
had the time to scan the code for bad things.. :)

Help would be appreciated, else i'll just have to go with my hacked 1.08 
and rage about that for a while. :-)

Regards,
Tommie Hansen
Graphic designer, web site designer and community manager
www.byme.se | www.dekorfilm.se | www.mindescape.se | www.webblosningar.se

Original issue reported on code.google.com by tommieha...@gmail.com on 5 Jan 2010 at 4:46

GoogleCodeExporter commented 9 years ago
Hi Tommie, thanks for the report. Do you have somewhere I can see the bug? I 
need to
be able to reproduce it or see it happening but since TimThumb is currently 
working
in all my tests I don't know how to fix this

Original comment by BinaryMoon on 8 Jan 2010 at 10:56

GoogleCodeExporter commented 9 years ago
The same thing here. It only takes place when I work locally on Wamp-server.
I've fixed this problem by replacing:

if (ereg('http://', $src) == true) {  
    $url_info = parse_url ($src);

with:

if (strpos($src, 'http://') <> '') {
    $url_info = parse_url ($src);

------------------------------------
I'm sure there is a better way, but it worked for me.

P.S. Thanks a lot, Ben. Awesome script. Keep up the good work.

Regards,
Yuriy Portnykh (http://twitter.com/YAWebDesign)

Original comment by uportn...@gmail.com on 8 Jan 2010 at 1:16

GoogleCodeExporter commented 9 years ago
No, don't got my current working theme online. Sorry.

ereg is deprecated since PHP 5.3 though and WAMP comes default with PHP 
5.3.0... so 
that would explain it not working quite as intended.

http://www.php.net/manual/en/function.ereg.php

Thanks for the insight Yuriy. :)

Original comment by tommieha...@gmail.com on 8 Jan 2010 at 5:59

GoogleCodeExporter commented 9 years ago
uportnykh, workaround works for me...

Original comment by caser...@gmail.com on 23 Feb 2010 at 6:42

GoogleCodeExporter commented 9 years ago
Hi, tried uportnykh's workaround, and replaced 

if (ereg('http://' $src) == true) {  
    $url_info = parse_url ($src);

with 

if (strpos($src, 'http://' <> '') {
    $url_info = parse_url ($src);

I now get this error:
Parse error: parse error in
C:\www\wordpress\wp-content\themes\yamidoo\scripts\timthumb.php  on line 555. 
Line
555 being the lines just replaced.

I am on WAMP.

Original comment by george_r...@hotmail.com on 26 Feb 2010 at 10:34

GoogleCodeExporter commented 9 years ago
Hi, I have fixed the script for PHP 5.3, it was simple (just changed ereg to
preg_match and used # delimiter). This blogpost helped me with it a lot:
http://devthought.com/tumble/2009/06/fix-ereg-is-deprecated-errors-in-php-53/

FIX FOR PHP 5.3:
------------------------

find line 550, replace:

if (ereg('http://' $src) == true) {  

with:

if (preg_match('#http://#', $src) == true) {

// (using # delimiter)

then at line 556 replace:

if (ereg($site, $url_info['host']) == true) {

with:

if (preg_match($site, $url_info['host']) == true) {

*Working for me* @ three PHP 5.3 hostings and at my local EasyPHP 2.0 ;), I 
hope it
will work for you as well.

Original comment by steww...@gmail.com on 14 Mar 2010 at 8:09

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
for comment by stewwwie

use ...
if (preg_match('#http://#', $src) == true) {

//notice the comma

Original comment by alesm...@gmail.com on 19 Apr 2010 at 2:09

GoogleCodeExporter commented 9 years ago
ignore my comment above... 

for some reason the comma cannot be displayed 

if (preg_match('#http://#'<comma> $src) == true) {

Original comment by alesm...@gmail.com on 19 Apr 2010 at 2:10

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
thanks for noticing, alesmana, i didn't see it at all, and for others I am 
attaching
fixed version

Original comment by steww...@gmail.com on 19 Apr 2010 at 4:47

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the detective work - seems to work well. The fix has been added to 
the core.

Original comment by BinaryMoon on 26 Apr 2010 at 8:29

GoogleCodeExporter commented 9 years ago
hey i tried the patch but i cant get it to work it doesn't display any images
this is my call from index.php on wordpress 3.0
and i included my timthumb.php version 1.14
thanks

<div class="post" id="post-<?php the_ID(); ?>">

                <div class="box">

                <a href="<?php the_permalink() ?>" rel="bookmark" title="Watch <?php the_title_attribute(); ?>">
                    <img src="<?php bloginfo( 'template_directory' ); ?>/scripts/timthumb.php?src=<?php echo get_post_meta( $post->ID, "post_image_value", true ); ?>&w=400&h=200&q=90&zc=1"  alt="<?php the_title(); ?>" />
                    </a>

                </div>

Original comment by arkz...@gmail.com on 30 Jul 2010 at 6:35

Attachments:

GoogleCodeExporter commented 9 years ago
@arkyai1 get current version (r81) from google code and replace it in your 
theme, current release works well on php 5.3 - 
http://code.google.com/p/timthumb/source/browse/#svn/trunk

Original comment by steww...@gmail.com on 31 Jul 2010 at 12:10

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
thanks stewwwie, after i updated timthumb to the latest version the images to 
show
you wrote that it works on php 5.3 but I'm running my site on 000webhost with a 
php 5.2.1 so i guess that the problem.
is there anyway to relove this?

p.s.
actully i the latest version of timthumb that show the images is version 1.08 
(revision 61)

Original comment by arkz...@gmail.com on 31 Jul 2010 at 1:40

GoogleCodeExporter commented 9 years ago
Thanks!!!!!!!!!!!!!!

I was having a problem displaying the images, at first, everything showed up 
just fine. Suddenly, things didn't work and images wont show.

I have downloaded the file attached here and replaced my theme timthumb with 
it. it just WORKS!!!!!

Thanks million thanks!!!

Original comment by mohamed....@gmail.com on 20 Oct 2010 at 8:00

GoogleCodeExporter commented 9 years ago
Just created a new issue similar to this one here: 
http://code.google.com/p/timthumb/issues/detail?id=130

Any help would be much appreciated! This is totally driving me crazy! 
Thanks

Original comment by mel.miss...@gmail.com on 9 Nov 2010 at 10:27

GoogleCodeExporter commented 9 years ago
can anyone tell me where i can download version 1.09?

Original comment by xcin...@gmail.com on 13 Mar 2011 at 9:13

GoogleCodeExporter commented 9 years ago
Grazie grazie grazie  STEWW!

I have downloaded the file attached here and replaced my theme timthumb with 
it. it just WORKS!!!!!

Grazie grazie grazie  STEWW!

Original comment by invec...@gmail.com on 13 Jul 2011 at 9:53

GoogleCodeExporter commented 9 years ago
You are welcome ;)
S.

Odesláno z iPhone

13.7.2011 v 23:53, timthumb@googlecode.com:

Original comment by steww...@gmail.com on 14 Jul 2011 at 3:26

GoogleCodeExporter commented 9 years ago
Your revised patch has solved my issue as well.
I am running PHP 5.3.6 
Thank you.

Original comment by horvthec...@gmail.com on 17 Dec 2011 at 2:32

GoogleCodeExporter commented 9 years ago
how i upgrade, upgraded versions are not working, not showing any images

Original comment by ashizak916 on 16 Apr 2012 at 9:46