• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

niceText problem in typo3/ImageMagick after upgrading from plesk 12.0 to 12.5 under CentOS7

Thomas Poisl

Basic Pleskian
All in all the 12.5 Upgrade went very smooth, so thank you for that good job!

One issue I got aware of after upgrading, is the fact, that niceText is no longer working in my existing typo3 installations.

After the upgrade I installed nginx and a new odin plesk php5.6, which I wanted to try recently.

Today I noticed in the typo3 installation, that niceText is no longer working in typo3 and I can confirm that by using the typo3 test setup wizard with the TestGDLib test. The last two images in the test ("niceText" and "niceText with a shadow under"), I can only see the background image without any text, although it is ment to show images with text and some nicely rendered aliasing and shadow.

I switched to the odin php5.6 FPM apache served module, but same thing here.

I ran the image magick commands in the console and could not see any error.

Checking the image magick installation revealed the following:
rpm -ql ImageMagick|grep libMagickCore.so
/usr/lib64/libMagickCore.so.5
/usr/lib64/libMagickCore.so.5.0.0
rpm -q ImageMagick
ImageMagick-6.7.8.9-10.el7.x86_64

Could you please have a look into that issue, since I found no evidence in the logs what the problem could be and how to solve it.
 
Hi Thomas Poisl,

can you confirm, that the extension is installed and enabled at the depending php.ini?

PHP from vendor:
existing entry: extension=imagick.so at .../php.d/imagick.ini

Plesk PHP 5.6:
existing entry: extension=imagick.so at /opt/plesk/php/5.6/etc/php.d/imagick.ini


Another way to be sure, that the extension is installed and enabled, is to use:

For Plesk PHP 5.6:
/opt/plesk/php/5.6/bin/php -m | grep magic
 
The file /opt/plesk/php/5.6/etc/php.d/imagick.ini contains extension=imagick.so

This does not work "/opt/plesk/php/5.6/bin/php -m | grep magic" but "/opt/plesk/php/5.6/bin/php -m | grep imagic" gives the proper output "imagick".
 
Hi Thomas Poisl,

when using "copy&paste" from formatted text, please make sure, that your browser doesn't copy the format as well, before you paste it to your command line of your ssh - client - in such cases, you have for example a space which is an invisible sign at your command line. There is no reason, why grep shouldn't find "magic" but "imagic", when "imagick" is existent. :D

Another short test, if imagick works as expected on your domain/subdomain:

Create a PHP - file ( for example "test-imagick.php" ) in your domain document folder, with the code:
Code:
<?php

/* Create a new imagick object */
$im = new Imagick();

/* Create new image. This will be used as fill pattern */
$im->newPseudoImage(50, 50, "gradient:red-black");

/* Create imagickdraw object */
$draw = new ImagickDraw();

/* Start a new pattern called "gradient" */
$draw->pushPattern('gradient', 0, 0, 50, 50);

/* Composite the gradient on the pattern */
$draw->composite(Imagick::COMPOSITE_OVER, 0, 0, 50, 50, $im);

/* Close the pattern */
$draw->popPattern();

/* Use the pattern called "gradient" as the fill */
$draw->setFillPatternURL('#gradient');

/* Set font size to 40 */
$draw->setFontSize(40);

/* Annotate some text */
$draw->annotation(20, 50, "Odin's Forum is awesome!");

/* Create a new canvas object and a white image */
$canvas = new Imagick();
$canvas->newImage(500, 75, "white");

/* Draw the ImagickDraw on to the canvas */
$canvas->drawImage($draw);

/* 1px black border around the image */
$canvas->borderImage('black', 1, 1);

/* Set the format to PNG */
$canvas->setImageFormat('png');

/* Output the image */
header("Content-Type: image/png");
echo $canvas;
?>

Open the file with your favourite browser and you should see:

Odin_s_Forum_is_awesome_001.png
 
Indeed in the copied grep somehow the "c" character was interpreted differently than a "c" entered directly in console, nevermind.

The php code you pasted is producing the desired output.

Typo3 specifies the exact commands what this "niceText" thing does, and this returns only the background without any text:

Command: '/usr/bin/convert' +profile '*' -geometry 170x136! -negate 'maskNT.png[0]' 'maskNT.png'
Command: '/usr/bin/convert' +profile '*' -colorspace GRAY +matte 'maskNT.png[0]' '1.png'
Command: '/usr/bin/composite' +profile '*' -compose over +matte 'colorNT.png' 'menuNT.png' '1.png' 'menuNT.png'

Also the test that should show some niceText with shadows is only producing background color without any text:

Command: '/usr/bin/convert' +profile '*' -geometry 170x136! -negate 'maskNT.png[0]' 'maskNT.png'
Command: '/usr/bin/convert' +profile '*' -colorspace GRAY +matte 'maskNT.png[0]' '1.png'
Command: '/usr/bin/composite' +profile '*' -compose over +matte 'colorNT.png' 'menuNT.png' '1.png' 'menuNT.png'
Command: '/usr/bin/convert' +profile '*' -geometry 170x136! -negate 'maskNT.png[0]' 'maskNT.png'
Command: '/usr/bin/convert' +profile '*' -colorspace GRAY +matte 'maskNT.png[0]' '1.png'
Command: '/usr/bin/composite' +profile '*' -compose over +matte 'colorNT.png' 'mmenuNT.png' '1.png' 'menuNT.png'
Command: '/usr/bin/convert' +profile '*' -geometry 170x136! -negate 'maskNT.png[0]' 'maskNT.png'
Command: '/usr/bin/convert' +profile '*' -colorspace GRAY +matte 'maskNT.png[0]' '1.png'
Command: '/usr/bin/composite' +profile '*' -compose over +matte 'colorNT.png' 'menuNT.png' '1.png' 'menuNT.png'
 
Hi Thomas Poisl,

as the imagick - extension works as expected, please consider to search for issues/problems and answers with the help of the typo3 - community ( https://forum.typo3.org/ ), because the Odin - Forum is a "Odin's products based forum" and tryout as well a lower PHP - version, in order to eliminate changes, depending on PHP versions.
 
Back
Top