When I use the latest beta version of ImageCache, images are not created no matter which preset I use. If I use a preset with no actions in it, the image displays correctly. If I add any sort of action, then I get this error in the watchdog:

imagejpeg(): 66 is not a valid Image resource in /home/tensamur/public_html/modules/imageapi/imageapi_gd.module on line 169.

Any advice?

Comments

dopry’s picture

Are there any errors in the watchdog?

Tomkun’s picture

Apart from the one I wrote above, no.

dopry’s picture

also did you run update.php?

Is there a url I can check this image out at? I haven't been able to reproduce.

Tomkun’s picture

I am not sure what you mean... It happens with any picture.

dopry’s picture

After you installed the new modules, did you go to example.com/update.php and run the database updates?

Tomkun’s picture

Yes, I did. I have even reinstalled everything from scratch with the same result. However, I noticed that there was another thread with a similar problem, so now I am not convinced it is an imagecache problem rather than an imageapi problem.

Edit:

I see that you have also spotted the other thread... Apart from the numbers, the problem seems to be the same. Perhaps we should merge the threads.

simul’s picture

I'm getting the same error. Just the resource number in the message is different.

ladamiak’s picture

I'm getting the same error too. The presets never generate the images it should, and I keep getting this error below:

"warning: imagejpeg(): 56 is not a valid Image resource in /public_html/mv/sites/all/modules/imageapi/imageapi_gd.module on line 169."

pacome’s picture

I'm also getting this error... but instead of "warning: imagejpeg(): ...." I get "warning: imagegif():..." not a big difference !

I don't understand php enough to understand where is the problem. Hope someone could help !

Anyway, thanks for working on this new version of imagecache ! I've been looking around for a while for something like clickable thumnails...

Tomkun’s picture

Just an update... I don't want this issue to sink into obscurity.

At the moment, I have just one picture on my site set up to use imagecache and by extension, imageAPI. Although the error message I originally got gave the number 66, the number is getting progressively higher each time I try it. Now I am up to 81:

imagejpeg(): 81 is not a valid Image resource in /home/tensamur/public_html/modules/imageapi/imageapi_gd.module on line 169.

I actually get this message twice in a row.

Also, another error message is appearing:

preg_match() expects parameter 2 to be string, array given in /home/tensamur/public_html/includes/bootstrap.inc on line 670.

and finally:

Failed generating an image from venue/SH530002_0.JPG using imagecache preset .

timmillwood’s picture

I'm getting this error too...


# warning: imagejpeg(): 128 is not a valid Image resource in /var/www/vhosts/@£$%^*/httpdocs/sites/all/modules/imageapi/imageapi_gd.module on line 169.
# warning: imagejpeg(): 128 is not a valid Image resource in /var/www/vhosts/@£$%^*/httpdocs/sites/all/modules/imageapi/imageapi_gd.module on line 169.
# warning: htmlspecialchars() expects parameter 1 to be string, array given in /var/www/vhosts/@£$%^*httpdocs/includes/bootstrap.inc on line 631.
# One or more problems were detected with your Drupal installation. Check the status report for more information.

Tomkun’s picture

# One or more problems were detected with your Drupal installation. Check the status report for more information.

I think this one is unrelated. Check admin > logs > status report .

It probably means that you haven't run cron or that you forgot to update the database after installing a module.

# warning: imagejpeg(): 128 is not a valid Image resource in /var/www/vhosts/@£$%^*/httpdocs/sites/all/modules/imageapi/imageapi_gd.module on line 169.
# warning: imagejpeg(): 128 is not a valid Image resource in /var/www/vhosts/@£$%^*/httpdocs/sites/all/modules/imageapi/imageapi_gd.module on line 169.
# warning: htmlspecialchars() expects parameter 1 to be string, array given in /var/www/vhosts/@£$%^*httpdocs/includes/bootstrap.inc on line 631.

This stuff looks like the same problem though.

Did anyone have this same issue with an earlier version? I assume we are all using the beta now?

dopry’s picture

Can you run update.php as suggested by the status report? Does the problem persist after you run the update? Are any errors encountered on the update?

pacome’s picture

[edit]
In my case, when I run update.php everythings seems to go well for the update, but the errors are still here...

Also, if I expand "select version", it says "no updates available" for all the modules.. is that normal ?
Does it mean that when I run it nothing happen ?

I had a look around, but it stays foggy : if I have to choose a version, how can I know wich one ?

Thanks for your advices.

timmillwood’s picture

I have run update.php and still get the same errors!

Dimm’s picture

dopry’s picture

Status: Active » Closed (fixed)

Can you guys try updating to latest head and see if your problems are solved... if not open new issues.

jeff h’s picture

I think I know what is causing this problem... I had it too, and found that the latest imagecache requires PHP 5. For me, the error was under 4.4.4.