Imagick in PHPDesktop

92 views
Skip to first unread message

Roy Lüders

unread,
Jun 25, 2020, 3:36:24 AM6/25/20
to PHP Desktop
Hi,

i want load the extension php_imagick.

i put the php_imagick.dll in php/ext/, but it don't work.

Can someone help what should i do?

Roy

Czarek Tomczak

unread,
Jun 26, 2020, 7:18:14 AM6/26/20
to PHP Desktop
You also have to edit php.ini to load that extension. Your extension needs to be compatible with the PHP version that is shipped. PHP version shipped with PHP Desktop is NTS, so any extension also needs to be built for NTS or be compatible with it. If you have a TS only extensino then alternatively you can replace the PHP version to be TS as well. To replace PHP version see: https://github.com/cztomczak/phpdesktop/wiki/Knowledge-Base#php-interpreter--extensions .

Roy Lüders

unread,
Jun 27, 2020, 3:00:39 AM6/27/20
to PHP Desktop
Yes i have, but i must put the other DLLs in the "bin".
Here is the tut. https://mlocati.github.io/articles/php-windows-imagick.html

And this is what i dont understand:
"Extract from ImageMagick-….zip the DLL files located in the bin folder that start with CORE_RL or IM_MOD_RL, and save them to the PHP root directory (where you have php.exe), or to a directory in your PATH variable"

Czarek Tomczak

unread,
Jun 30, 2020, 8:04:54 PM6/30/20
to PHP Desktop
It says to put them DLLs in the same directory where php.exe resides. So do as instructions say.

Roy Lüders

unread,
Jul 3, 2020, 2:24:06 AM7/3/20
to PHP Desktop
Thank you now it is working. i didnt know the is mean the php.exe.

Roy Lüders

unread,
Jul 13, 2020, 3:17:36 AM7/13/20
to PHP Desktop
Hi there,
next Problem. i pushed all the datas in the folders.
It show also the imagick in phpinfo(), but if i want to convert one file, it shows an Error:

Error 500: Internal Server Error
CGI program sent malformed or too big (>16384 bytes) HTTP headers: []

The File is 3 kb big.

And this is my code:

$imagick = new Imagick();
$imagick->setResolution(300, 300);
$imagick->readImage('models\1.pdf[0]');
$imagick->setImageFormat('jpg');
$imagick->scaleImage(1200, 1200, true);
$imagick->setImageAlphaChannel(Imagick::VIRTUALPIXELMETHOD_WHITE);
$imagick->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN);
file_put_contents('models\2.jpg', $imagick);

where is my fail?

Czarek Tomczak

unread,
Jul 20, 2020, 7:20:21 AM7/20/20
to PHP Desktop
Reply all
Reply to author
Forward
0 new messages