Problem with imagecreatefrompng

2009-05-15 Thread KevinWhite

Hi folks,

I am creating a pretty straightforward application and am using the
image behaviour plugin to manage news splash images. This all works
well on my development server (PHP5, sensible set up) but when I
installed on the staging server (PHP4, unknown and weird set up) the
image upload was causing the to just stop with no error and no error
in the error.log.

I set up a quick test page which simply did:

$image = imagecreatefrompng( 'img/_system/view.png' );
debug( $image );

And this worked fine, displayed:

resource(3) of type (gd)

I then placed the same code within the __resize method of behaviour/
image.php. Failed.

I then placed the same code within /index.php (dumped to error_log
rather than debug). Worked.

So I traced through and came up with the problem that if the code
appears before the call to $controller-dispatchMethod in
dispatcher.php line 227, then the image is created fine. If it appears
in dispatchMethod in object.php line 113 then it fails.

I am completely stumped on this, there is nothing apparent going on
between the call to dispatchMethod and what happens after this.

I would really appreciate any thoughts that anyone has on this.

Thanks

Kevin


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with imagecreatefrompng

2009-05-15 Thread fain182

 I would really appreciate any thoughts that anyone has on this.
can you put the code of the behavior in a pastebin ?
i use imagecreatefrom* in a behavior without any problem..

-- 
pietro

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---