php errors / multi-site install
| Project: | Zoomify |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
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
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
I've just tried the new dev, and the problem no longer happens. Thanks for the quick fix.
#3
Automatically closed -- issue fixed for 2 weeks with no activity.