marshsu / timthumb

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

No image specified - and no url specified #427

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. If I upload images in WP Portfolio - all seems to run fine.
2. My Portfolio itself reproduces the images, without a problem. But on the 
Portfolio overview page - where a thumbnail of the image should be shown, there 
is only a broken image icon visible. Clicking on the place of the thumbnail 
with a right mouse click opening a new window for the image only, it says: 
A TimThumb error has occured

The following error(s) occured:
No image specified

Query String : src=&w=400&h=480&zc=1&f=2
TimThumb version : 2.8.11

3. Here is visible that the url is totally missing, does not seem to have been 
able to get it from the script. If I look in the folder or even via the url 
http://www.liselottehartkamp.com/wp-content/themes/elitist/framework/timthumb.ph
p?src=/wp-content/uploads/2013/02/DSC04441.jpg&w=400&h=480&zc=1&f=2 the images 
are there. They are created.

What version of the product are you using? On what operating system?
I am using the latest version and all CHMod are set in the right way. Nothing 
wrong there.

Please provide any additional information below.
I believe that something is wrong in creating the path in the timthumb.php
In this part:
    $this->myHost = preg_replace('/^www\./i', '', $_SERVER['HTTP_HOST']);
        $this->src = $this->param('src');
        $this->url = parse_url($this->src);
        $this->src = preg_replace('/https?:\/\/(?:www\.)?' . $this->myHost . '/i', '', $this->src);

        if(strlen($this->src) <= 3){
            $this->error("No image specified");
            return false;
        }

Original issue reported on code.google.com by christel...@dekampanje.org on 2 Feb 2013 at 8:50

GoogleCodeExporter commented 9 years ago
OK, go and see your timthumb php script URL:
http://www.liselottehartkamp.com/wp-content/themes/elitist/framework/timthumb.ph
p

See there? "No image specified", that's the problem.

I had the same one and did not find a way to solve this by googling around, so 
I asked a friend. He looked at my code and said that the problem was not in 
timthum.php itself, but rather in the timthumb-config.php file that lies in the 
same folder.

So I'm attaching mine to you, in the hope that it solves your problem.

The file content is this : <code>

<?php

$_SERVER['DOCUMENT_ROOT'] = '/home/wilhelmkoetzler/www/novosite/';

</code>

My ridiculous problem is that my wordpress is installed in this 'novosite' 
subfolder, rather than in the root of the server. So, before the fix, my 
tithumb-config.php file had only '/home/wilhelmkoetzler/www/' in it.

Well, just tried to help. If it works, give me your feedback. If not, good look 
on your search =]

Original comment by one...@gmail.com on 4 Feb 2013 at 12:10

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by BinaryMoon on 27 Sep 2013 at 9:03