php errors / multi-site install

mrb@drupal.org - September 30, 2009 - 13:56
Project:Zoomify
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

After installing, if I edited an image node I'd get a long list of php errors like this:

warning: imagesx(): supplied argument is not a valid Image resource in /nfs/c03/h05/mnt/51424/domains/t.batgung.com/html/drupaldir/sites/all/modules/zoomify/ZoomifyFileProcessor.php on line 58.

Also the image on the zoomify tab would be all black.

The problem is because the path to the image files contains a "." character. (I'm running a multi-site installation, so the domain name appears as part of the path). That messes up the ZoomifyFileProcessor.php's 'detect file extension' code.

It is described in comment #27 at http://greengaloshes.cc/2007/05/zoomifyimage-ported-to-php/. A solution is also described there, but it didn't work for me, instead I replaced each occurrence of

list($root, $ext) = explode(".",$this->_v_imageFilename)  ;

with

$exploded_items = explode('.',$this->_v_imageFilename) ;
$ext = array_pop($exploded_items);
$root = implode('.', $exploded_items);

And now it works ok. Hope that helps someone else.

#1

kratib - September 30, 2009 - 17:15
Status:active» fixed

Thanks for the report and fix. I committed it and made sure it works in the default case. Please try the latest dev (12 hours from now) and let me know if it works for multi-sites.

#2

mrb@drupal.org - October 1, 2009 - 13:07

I've just tried the new dev, and the problem no longer happens. Thanks for the quick fix.

#3

System Message - October 15, 2009 - 13:10
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.