alternative to show thumbnails?

antonio
Posts: 77
Joined: 2010-09-28 11:48

alternative to show thumbnails?

Post by antonio » 2012-07-18 13:48

hi all,
I have great problem migrating some websites from a win2000 server (IIS5) to a new win2008 server (IIS 7.5).
I obtained to install php 4.4.9 to retain compatibility.
But I fear it's not enough.

I solved almost other problems with dynamic sites but I have a few websites that are creating problems.

The main problem is due to websites created with Kollection 3 pro (latest) and the "Show thumbnails" server behaviour.
It simply don't find images and the 'image not found' icon is shown instead of the thumbnail.
I already posted here abut this problem but I'm trying to give more info here.

I've got installed the ImageMagick libraries and they seems to work. I can confirm they work because I created a set of master/details page that allow to upload images and resize them. The images upload and resize regularly.

Then the problem is really tricky. Just continue read:
- the site has been done in italian and english.
- the english site si a copy of the italian one with includes pointing to the root ones; the english forder is EN.
- in the italian side (root) of the website the gallery (where thumbnails should be displayed) is broken (image not found);
- but in the english side the thumbnails display correctly... ????

Can't understand why.

Can someone help me?

TIA

tony

antonio
Posts: 77
Joined: 2010-09-28 11:48

Re: alternative to show thumbnails?

Post by antonio » 2012-07-18 15:59

I just add that the problem is related to sites that are not really on-line. I modified the HOSTS file in windows to see them.
So, can this be the culprit? And that once online the sites will be fine? who knows?
TIA

tony

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: alternative to show thumbnails?

Post by Fred » 2012-07-19 09:28

Hi Tony,
Interesting problem you have there.

Here is my suggestion to debugging the issue.

Add the full dynamic path and filename just below the thumbnail so you can see where the Italian version is looking for the file.
Can it be that the Italian version points to the wrong folder.

eg. ../images
instead of ../../images

or something similar...

antonio
Posts: 77
Joined: 2010-09-28 11:48

Re: alternative to show thumbnails?

Post by antonio » 2012-07-19 12:02

Fred wrote:Hi Tony,
Interesting problem you have there.
Here is my suggestion to debugging the issue.
Add the full dynamic path and filename just below the thumbnail so you can see where the Italian version is looking for the file.
Can it be that the Italian version points to the wrong folder.
eg. ../images
instead of ../../images
or something similar...
Hi Fred, thanks for your reply.
But how can get the dynamic path since the thumbnail should be created on-the-fly by the "$objDynamicThumb1->Execute(); " function?
The file name is tweaked by the server behaviour; infact, it adds the _70x70 suffix to the filename.

Here is the code for the dynamic thumbnail server behaviour:

Code: Select all

// Show Dynamic Thumbnail
$objDynamicThumb1 = new tNG_DynamicThumbnail("", "KT_thumbnail1");
$objDynamicThumb1->setFolder("upload/gallery/");
$objDynamicThumb1->setRenameRule("{rs_gall.filename_img}");
$objDynamicThumb1->setResize(70, 70, true);
$objDynamicThumb1->setWatermark(false);
Any idea?

Thanks again.

tony

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: alternative to show thumbnails?

Post by Fred » 2012-07-19 14:03

ahh sorry Tony,
Been going flat out since yesterday trying to get something done for Epson. Think I need a rest... :roll:

You said the sites did work on the old server and when migrating to the new server it stopped?
In that case the paths and things should be fine.
The permissions should be fine because the english version is working.

Take a look inside tNG-functions.inc.php around line 65 is the function to check if the file can be found.
Comment out the if statement to stop it from displaying the "Image not found".
Just above that is the variable containing the path $relPath

To be honest with you I have no ideas how ISS works as my servers are running on Linux.

antonio
Posts: 77
Joined: 2010-09-28 11:48

Re: alternative to show thumbnails?

Post by antonio » 2012-07-19 14:25

Fred wrote:ahh sorry Tony,
Take a look inside tNG-functions.inc.php around line 65 is the function to check if the file can be found.
Comment out the if statement to stop it from displaying the "Image not found".
Just above that is the variable containing the path $relPath
I changed the path to not found image (changed to a non -existent filename) but I get the same result. It seems the server cached the whole functions/images... and provide the old ones.

tony

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: alternative to show thumbnails?

Post by Fred » 2012-07-19 15:41

Highly unlikely that ISS would cache a php file. Variables are being passed back and forth so it is compiled and executed at runtime.

What happens if you hardcode the "known" path to the thumbnail into the page instead of generating it dynamically?
Just comment out the existing php code and insert a simple image placeholder. If your path is correct it should display the thumbnail.

Insert the following line just before the <a> tag of the thumbnail in the english page so you can find the dynamic path

Code: Select all

<?php echo $objDynamicThumb1->Execute();?>

antonio
Posts: 77
Joined: 2010-09-28 11:48

Re: alternative to show thumbnails?

Post by antonio » 2012-07-19 16:02

Fred wrote: What happens if you hardcode the "known" path to the thumbnail into the page instead of generating it dynamically?
Just comment out the existing php code and insert a simple image placeholder. If your path is correct it should display the thumbnail.
the image is showing correctly.
Fred wrote: Insert the following line just before the <a> tag of the thumbnail in the english page so you can find the dynamic path

Code: Select all

<?php echo $objDynamicThumb1->Execute();?>
the paths showing are correct: ../uploads/gallery/thumbnails/myfilename.jpg

It's the first time I encounter such kind of absurd problem.

Thanks, anyway.

tony

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: alternative to show thumbnails?

Post by Fred » 2012-07-19 16:18

antonio wrote: the paths showing are correct: ../uploads/gallery/thumbnails/myfilename.jpg
Pretty sure the script cant find the file

Is this the path relative from the english page or the italian page.
You said the english page is in a folder is it?

antonio
Posts: 77
Joined: 2010-09-28 11:48

Re: alternative to show thumbnails?

Post by antonio » 2012-07-19 16:35

Fred wrote: Pretty sure the script cant find the file
Is this the path relative from the english page or the italian page.
You said the english page is in a folder is it?
Here are the path on the italian file (on the root):

Code: Select all

<?php require_once('Connections/my_conn.php'); ?>
<?php
// Load the Navigation classes
require_once('includes/nav/NAV.php'); 

// Load the tNG classes
require_once('includes/tng/tNG.inc.php');
...
// Show Dynamic Thumbnail
$objDynamicThumb1 = new tNG_DynamicThumbnail("", "KT_thumbnail1");
$objDynamicThumb1->setFolder("upload/gallery/");
$objDynamicThumb1->setRenameRule("{rs_gall.filename_img}");
$objDynamicThumb1->setResize(70, 70, true);
$objDynamicThumb1->setWatermark(false);
?>
...
<body>
...
 <a title="<?php echo $row_rs_gall['description_img']; ?>" href="upload/gallery/<?php echo $row_rs_gall['filename_img']; ?>" class="fancy" rel="<?php echo $row_rs_gall['idalb_img']; ?>"><img border="0" src="<?php echo $objDynamicThumb1->Execute(); ?>" align="absmiddle" /></a> 
While here is the code for the english page (on the /en folder):

Code: Select all

<?php require_once('../Connections/my_conn.php'); ?>
<?php
// Load the Navigation classes
require_once('../includes/nav/NAV.php'); 

// Load the tNG classes
require_once('../includes/tng/tNG.inc.php');
...
// Show Dynamic Thumbnail
$objDynamicThumb1 = new tNG_DynamicThumbnail("../", "KT_thumbnail1");
$objDynamicThumb1->setFolder("../upload/gallery/");
$objDynamicThumb1->setRenameRule("{rs_gall.filename_img}");
$objDynamicThumb1->setResize(70, 70, true);
$objDynamicThumb1->setWatermark(false);
?>
<body>
...
<a title="<?php echo $row_rs_gall['description_img']; ?>" href="../upload/gallery/<?php echo $row_rs_gall['filename_img']; ?>" class="fancy" rel="<?php echo $row_rs_gall['idalb_img']; ?>"><img border="0" src="<?php echo $objDynamicThumb1->Execute(); ?>" align="absmiddle" /></a>
This problem is driving me crazy.

tony

Post Reply