October 14, 2019, 12:57:30 AM
 Pages: [1] 2
 Author Topic: Thumbnail Generation Error. Thumbnail not created.  (Read 53465 times)
mugwumpr
Newbie

Posts: 16

 « on: December 02, 2006, 02:07:55 AM »

I did all the downloading and unzipping and editing; I made sure that I had the syntax correct for generating a website thumbnail, but all I get is this error:

Thumbnail Generation Error. Thumbnail not created.

What have I done wrong?

 Logged
zubrag
Hero Member

Posts: 788

 « Reply #1 on: December 02, 2006, 04:38:31 PM »

Looks like your host does not allow to run Internet Explorer thus it cannot create website thumbnail.

Remove @ sign from the following line in the script, save, give it a try, and see if it outputs some errors.

@exec('IECapt.exe ' . $website_url . ' ' .$cached_filename);
 Logged
mugwumpr
Newbie

Posts: 16

 « Reply #2 on: December 02, 2006, 10:30:57 PM »

Hi zubrag,

It didn't generate any new errors; still just the thumbnail generation one.

I am my own host - running on a windows XP machine, php5, apache2..... Is there anything I can change in the settings to allow the script to run?
 Logged
zubrag
Hero Member

Posts: 788

 « Reply #3 on: December 03, 2006, 06:03:16 AM »

Its good you are at your own hosting. Things are easier to debug.

Seems like you have error output suppressed. Try adding following code after the first line in the webthumb.php. It will enable errors output to the browser.

Code:
ini_set('display_errors','1');
ini_set('error_reporting',E_ALL);

Make sure you also removed all @ signs from the file. This sign also suppresses error output.

Then try running web site thumnbnail creator again. Any new errors shown?

Check the folder you set as thumbnails folder ($thumbnails_folder setting). Does it contain any images? Also post here parameters you are passing to the script. Maybe I'll be able to find something out from it.  Logged mugwumpr Newbie Posts: 16  « Reply #4 on: December 04, 2006, 10:56:03 AM » I added those lines, removed the @, and unfortunately nothing changed. No new error messages, no images in the thumbs folder, just the same old Thumbnail Generation Error. I even double checked to make sure the thumbs folder is writeable; it is. The line I'm using to try to generate something is: http://www.mugwumpr.com/webthumbs/webthumb.php?url=http://www.petrodents.com  Logged zubrag Administrator Hero Member Posts: 788  « Reply #5 on: December 04, 2006, 01:36:13 PM » Strange, i tested it on Windows XP and it worked. Please make sure gdiplus.dll exists somewhere in your Windows folder. Try also copying gdiplus.dll to the folder where you saved iecapt.exe. Does it help? If it does not, then please post here settings section from the script. I'll have a look...  Logged mugwumpr Newbie Posts: 16  « Reply #6 on: December 04, 2006, 09:33:04 PM » A search shows that gdiplus.dll exists in 3 places in my windows folder, but I downloaded a fresh copy into the webthumbs folder anyway. Still no joy. Here are my settings for the thing. The **** is just to hide the entire path from public consumption; if you need it I can send it privately. // Folder to save all thumbnails. // Must end with slash!!!$thumbnails_folder = 'C:/****/mugwumpr/webthumbs/thumbs/';

// thumbnails expiration time in minutes
$cache_expire_time = 60; // quality (for jpeg only)$image_quality = 100;

// resulting image type (1 = GIF, 2 = JPG, 3 = PNG)
$image_type = 3; // maximum thumb side size$max_x = 100;
$max_y = 100; // If not equal 0 then cut original image size before resizing (in pixels). // Long page will have bad thumbnail, its better to cut page length first.$cut_x = 0;
$cut_y = 1024; Just for giggles, I'm going to try installing it on my other machine at home in a couple of hours to see if it works there. Maybe it will at least give a useful error message instead of being so dang shy about it.  Logged zubrag Administrator Hero Member Posts: 788  « Reply #7 on: December 05, 2006, 03:07:05 AM » Lets try if iecapt.exe is working ok with simple web page layout. Need to run iecapt in the following way. You can do that from command prompt (click Start Menu -> click Run option -> type cmd.exe -> then type string below). c:\here\your\path\to\iecapt.exe http://www.goodsadvisor.com c:\test.png It should create c:\test.png. Does it work?  Logged mugwumpr Newbie Posts: 16  « Reply #8 on: December 05, 2006, 11:26:45 AM » Whoo hoo! It worked! test.png exists!  Logged zubrag Administrator Hero Member Posts: 788  « Reply #9 on: December 05, 2006, 11:43:24 AM » Very good. Now try replacing that simple layout site with one you had problems with. c:\here\your\path\to\iecapt.exe http://www.petrodents.com c:\test.png Is it also working? Maybe you are running php in safe mode? Wondering if your php5 is allowed to perform "exec" php command.  Logged mugwumpr Newbie Posts: 16  « Reply #10 on: December 06, 2006, 12:51:18 AM » Yup, that one worked, too. Is the safe mode the register_globals thing? I tried it set to both On and Off, restarting the server between changes, and I got the same old result both times.  Logged zubrag Administrator Hero Member Posts: 788  « Reply #11 on: December 06, 2006, 04:56:42 AM » Safe mode setting is named safe_mode in the php.ini Please also check if you have some disable_functions directives in the php.ini. For example disable_functions exec Lets try to get output from the iecapt. Change following code @exec('IECapt.exe ' .$website_url . ' ' . $cached_filename); To$arr = array();
exec('IECapt.exe ' . $website_url . ' ' .$cached_filename, $arr); echo "<pre>"; print_r($arr);

and run script again. Does it show some information?
 Logged
mugwumpr
Newbie

Posts: 16

 « Reply #12 on: December 07, 2006, 02:24:59 AM »

Heh.... ya, I guess naming safe mode safe_mode makes a lot of sense (sorry, it was late and I wasn't thinking clearly when I posted the last message).  It is now off, and it made no diff.  There are no disabled functions.

Changing the code produced the following result:
Array
(

• => Usage: IECapt.exe http://www.example.org/ localfile.png
)
Thumbnail Generation Error. Thumbnail not created.

 Logged
zubrag
Hero Member

Posts: 788

 « Reply #13 on: December 07, 2006, 04:22:53 AM »

That means parameters are broken or not passed to the iecapt.exe. Lets see what we pass to iecapt...

add following line before the exec('IECapt.exe ' ...) line:

echo '<b>IECapt.exe ' . $website_url . ' ' .$cached_filename . '</b>';

and run script again. It should print in bold how we run the capture. What is the output?
 Logged
 Pages: [1] 2