Page 1 of 1

Image Gallery 3 problem

Posted: Sun Jul 17, 2005 9:52 am
by cuhlcannon
Installed the new (v. 3) image gallery with no problem in my latest release (10) of cms and when I went to upload an image, I got:


Fatal error: Call to undefined function: imagecreatefromjpeg() in E:\hshome\pbolge1\patrickbolger.com\modules\ImageGallery\imageutil.php on line 120

Also, I am wanting to try and modify how the gallery displays the images, once they are uplaoded and I have the thing working. Is there any simple way of doing this, considering I pretty familiar with css and xhtml layouts?

Re: Image Gallery 3 problem

Posted: Mon Jul 18, 2005 12:00 pm
by Steven
Same here,

Some pkg info (FreeBSD 4-stable):
php4-4.3.11_1       PHP Scripting Language (Apache Module and CLI)
php4-gettext-4.3.11_1 The gettext shared extension for php
php4-mysql-4.3.11_1 The mysql shared extension for php
php4-pcre-4.3.11_1  The pcre shared extension for php
php4-session-4.3.11_1 The session shared extension for php

Re: Image Gallery 3 problem

Posted: Mon Jul 18, 2005 12:19 pm
by Steven
We are missing GD support. http://nl2.php.net/imagecreatefromjpeg <-- "Note: JPEG support is only available if PHP was compiled against GD-1.8 or later."

Installing the port/package php4-gd fixed it for me; on windows you probably have to recompile php or something.

Re: Image Gallery 3 problem

Posted: Mon Jul 18, 2005 12:25 pm
by Steven
*Another* reply, now registered...

I'm getting the following message while looking at a photo:
Table 'cms_krx_nl.cms_module_imagegallery_image' doesn't existTable 'cms_krx_nl.cms_module_imagegallery_image' doesn't exist

Twice 'table not found'. I believe I installed it the proper way (extracting it to the modules/ dir, installing the module via the module manager, setting perms, creating a new album, uploading pictures...).

Is the install script incomplete or did I do something wrong?


-- edit --


Found the bug: image.php, function nextImage:
function nextImage(&$db)
{
$query = 'SELECT pk FROM cms_module_imagegallery_image WHERE album_pk=? AND...

The function isn't following cmsmadesimple configuration settings, fix:

Replace the $query line in the nextImage function with the following one:
$query = 'SELECT pk FROM '.cms_db_prefix().'module_imagegallery_image WHERE album_pk=? AND order_nr > ? ORDER BY pk LIMIT 0,1;';

The same is happening in the function prevImage, same file.
$query = 'SELECT pk FROM '.cms_db_prefix().'module_imagegallery_image WHERE album_pk=? AND order_nr < ? ORDER BY PK DESC LIMIT 0,1;';

Re: Image Gallery 3 problem

Posted: Mon Jul 18, 2005 2:38 pm
by ghostrifle
Uhhh.... yeah stupid mistake. I will upload a new fixed version today or tomorrow. Depends on the free time I have.

Thanx, Alex