warning: Parameter 2 to imageapi_gd_image_overlay() expected to be a reference, value given in C:\xampplite\htdocs\root\sites\all\modules\imageapi\imageapi.module on line 166.

please help for mistake

#22 imagecache_canvasactions.patch1.54 KBtche082
Members fund testing for the Drupal project. Drupal Association Learn more


sistro’s picture

Same problem happens to me too!

xecstasyx’s picture

same here!

any ideas?

xecstasyx’s picture

Assigned: Duke Nukem » Unassigned

I found out that the the imageapi_gd_image_overlay() function is found at imagecache-actions module (imagecache_actions/imagecache_canvasactions.module) so maybe this error could be related to that module...

walker2238’s picture

Experiencing this as well

sistro’s picture

It's seems to be a php5.3 problem.
Try out with php 5.2, I solved.

orkaan’s picture

Have the same with 6.x-2.0 on Debian and PHP 5.3.2-1.
Please help to get worked.

orkaan’s picture

cookiesunshinex’s picture

I've read the thread in the imagecache-actions module and it's hard to determine exactly what is the fix for this.

Any further thoughts on this?

orkaan’s picture

Try to replace a definition of funtion that way, cookiesunshinex:

-function imageapi_gd_image_overlay(&$image, &$layer, $x, $y, $alpha = 100, $reverse = FALSE) {
+function imageapi_gd_image_overlay(&$image, $layer, $x, $y, $alpha = 100, $reverse = FALSE) {
xecstasyx’s picture

it works. Thanks!

alvinlb’s picture

Orkaan, thank you!!!!!

anou’s picture

Thanks again :-) !

grendzy’s picture

Status: Active » Closed (duplicate)
ghinix’s picture

Thank you, Orkaan! and other contributors.

#9 worked, awesome!

protoplasm’s picture

a. Local development server is php 5.3 -->errors with broken image uploading identical to that mentioned here.
b. Production server is php 5.2.14-->no image upload errors

#9 fixed a. errors.

Thank you so much.

amitavroy’s picture

thanks man
it worked :)

deadjohn’s picture

Thanks A lot! I spent so much time searching for a solution!

mbria’s picture

Thanks a lot for sharing.

It also worked in my site.

BeatnikDude’s picture

Me: Ubuntu 10.04: PHP 5.3.2: Drupal 6.20: ImageCache 6.x-2.0-beta10
#9 did the trick. Lets commit this patch!

cookiesunshinex’s picture

@BeatnikDude, I agree.

This issue has been around for a while now.

ThePixelMines’s picture

I couldn't find it mentioned in here, but (for those of you who don't know), #9 is referring to imagecache_canvasactions.module found in the imagecache_actions module.

It worked for me, too. One tiny &.

tche082’s picture

Status: Patch (to be ported) » Closed (duplicate)
1.54 KB

#9 wouldn't work if you are using imagemagik as your toolkit. Here is a patch to fix both gd and imagemagik.

tche082’s picture

Status: Closed (duplicate) » Patch (to be ported)

Reopening for issue not fixed.

grendzy’s picture

tche082: This is the issue queue for Drupal core. Your patch pertains to the imagecache_actions module. A fix is in progress at #1153518: Overlay (watermark) fails on PHP 5.3 due to pass-by-reference error.

gansbrest’s picture

Here is another solution to this problem: http://drupal.org/node/540486#comment-5334254

Maybe will be useful for someone.

prakashrajavel’s picture

i m tried your Patch and code as per your instruction but not working. is there another solution for it to solve this issue.