[BlueOnyx:19869] Re: GD image problem

fastreplies fastreplies at shaw.ca
Sat Jul 23 16:58:20 -05 2016


Hi,

Before all. Is just updating PHP will solve this problem and if yes, is 
there version of yum to replace the one I have now?

Cheers
Bart


----- Original Message ----- 
From: "Michael Stauber" <mstauber at blueonyx.it>
To: "BlueOnyx General Mailing List" <blueonyx at mail.blueonyx.it>
Sent: Saturday, July 23, 2016 10:55 AM
Subject: [BlueOnyx:19868] Re: GD image problem


> Hi Bart,
>
>> I have noticed that programs which are using GD wouldn't work.
>>
>> Main problem, it wouldn't display image code used in mailform
>> and programs which are relying on GD to resize image,
>> wouldn't work.
>
> Do you by chance have an actual code sample that isn't working?
>
> The thing is: PHP has a couple of different methods how to generate and
> manipulate images.
>
> Something like this will work just fine - even on 5209R:
>
> <?
> header("Content-Type: image/png");
> $im = @imagecreate(110, 20)
>    or die("Cannot Initialize new GD image stream");
> $background_color = imagecolorallocate($im, 0, 0, 0);
> $text_color = imagecolorallocate($im, 233, 14, 91);
> imagestring($im, 1, 5, 5,  "A Simple Text String", $text_color);
> imagepng($im);
> imagedestroy($im);
> ?>
>
> It works fine, because it just uses GD to do these things. There are
> other forms of creating/manipulating images via PHP, which rely on
> external programs as provided by ImageMagick to convert or modify
> images. While GD is native (i.e.: built into PHP), ImageMagick usage
> requires that PHP has access to these external binaries:
>
> /usr/bin/animate
> /usr/bin/compare
> /usr/bin/composite
> /usr/bin/conjure
> /usr/bin/convert
> /usr/bin/display
> /usr/bin/identify
> /usr/bin/import
> /usr/bin/mogrify
> /usr/bin/montage
> /usr/bin/stream
>
> As you can see, they reside in /usr/bin/ and it could be that your
> OpenBasedir restrictions for that Vsite don't allow the PHP script(s)
> access to /usr/bin/ for security reasons.
>
> So please add /usr/bin/ to your OpenBasedir allowances in the PHP
> configuration of that Vsite and see if that fixes the problem.
>
> -- 
> With best regards
>
> Michael Stauber
> _______________________________________________
> Blueonyx mailing list
> Blueonyx at mail.blueonyx.it
> http://mail.blueonyx.it/mailman/listinfo/blueonyx 





More information about the Blueonyx mailing list