Problems with PHP GD library when installing Typo3 - php

When I want to install the CMS TYPO3, following problems get detected:
PHP GD library true color support broken
GD is loaded, but calling imagecreatetruecolor() fails. This must be fixed, TYPO3 CMS won't work well otherwise.
PHP GD library gif support broken
GD is loaded, but calling imagecreatefromgif() fails. This must be fixed, TYPO3 CMS won't work well otherwise.
PHP GD library png support broken
GD is compiled with png support, but calling imagecreatefrompng() fails. Check your environment and fix it, png in GD lib is important for TYPO3 CMS to work properly.
When I search for PHP GD2 in my apache server I can only find GD without the 2 - ist this a problem?
There are also some yellow colored problems - do I also have to fix these?

I had the same problem when running the latest wersion of XAMPP as it include PHP v8.
I installed an older version of XAMPP with php v 7.4.13 and the problem seems gone.

Related

Enable webp in php 7 without recompiling

Is it possible to enable gd webp support in PHP 7.4 on debian (with nginx) without recompiling php? All solutions I found recompile PHP7 with the --with-webp-dir param.
You can sort of do it. Save an image file on your server, and then convert it to WebP.
See: How to Enable WebP support Php 7 without Recompiling?
I agree, it is not perfect, but quite close.

Enabling gd webp on AWS EC2 instance

I'm having an issue trying to use Intervention Image to manipulate webp files. The statement causing the error is:
Image::make($image->getRealPath())->resize(250, 250)->save($path);
The error I run into is:
Unsupported image type. GD/PHP installation does not support WebP format.
I have the gd library installed, however it does not support webp.
I've looked around, and the closest I've found to a solution is here, which suggests adding additional extensions when initially (manually) compiling PHP: Call to undefined function imagewebp()
I would prefer not to uninstall and manually compile PHP with additional extensions. Is this the only option? Are there any straightforward solutions?

How to upgrade the version of php-gd library when running from php-fpm at Ubuntu 16.04 server?

I've followed this tutorial to install and support PHP-5.6 at my ISPConfig3 server: https://www.howtoforge.com/tutorial/how-to-install-php-5-6-on-ubuntu-16-04/.
The installation is up and running, now I want to change the php-gd library version. PHP info actually reports:
GD Support enabled
GD Version bundled (2.1.0 compatible)
I need to use the following version:
GD Support enabled
GD headers Version 2.2.3
GD library Version 2.2.3
Why do i need to upgrade?
I'm facing problems when cropping images, but is only on this server. I've a similar server with PHP-5.6, without fpm, that is working fine. I realized the difference in versions after compare the phpinfo() reports from both servers
Expected Behavior
User uploads an image. The image can have any dimension. (eg: 1920x1080)
The script resizes the image. (eg: from 1920px to 1200px)
The resized image maintain it's original aspect ratio and should not be cropped.
See: http://imgur.com/MkMVg6x
The problem
User uploads an image. The image can have any dimension. (eg: 1920x1080)
The script SHOULD resize the image. (eg: from 1920px to 120px)
The final image was cropped erroneously :(
See: http://imgur.com/a/wT0Rh
Since i'm using php-fpm, how can i upgrade my GD library version?
After long hours digging, I finally found the problem, and as i expected, it's not related to GD library itself. It's related to phpThumb and imagemagick libraries.

PHP Script for Imagemagick

can anybody recommend a script which creates Thumbnails with imagemagick? All I could found were too old. It has to run with php5 and on a newer linux server.
It is important, that it uses imagemagick and not GD Lib. I already know timthumb, but it uses GD lib.

What are the odds of GD or ImageMagick already being part of a client's PHP install?

I'm working on a package which includes rescaling of images in PHP. For image rescaling, PHP has the GD and ImageMagick libraries. Are those likely to be part of a given client's PHP install already?
Is there a "default" install of PHP, for that matter? By default, are either GD or ImageMagick included?
If neither is installed, should I have some sort of horrible fallback position of reading, rescaling, and saving GIFs, JPGs, and PNGs, or is it simple to add GD or ImageMagick to an existing install?
i can't remember when i've last seen a lamp hosting provider without GD. the imagemagick extension is not that widespread. if they run their server themself, they really should be able to activate one of it or both. in your place i'd build the full functionality with GD and a (probably reduced) imagemagick fallback. if they got neither, show them the basic concepts of the wheel and/or fire, they should be grateful.
PS: i encountered providers that deactivated certain GD functions (computationally too intensive on a shared hosting environment), like imagerotate and imagefilter.
GD is the easiet library to include in php.. it is "only" an extension, mainly included in php packages... the only operation needed is to activate the extension.
Regarding ImageMagik, it is more complecated, since the php imageMagik library is only an interface for the image magik software.
Using imageMagik require both software and php library installed
It is reasonable to expect the client to have the capability or an understanding of how to add the library. Are you selling software or servers maintenance?
If you're going for the whole "ease of use" angle, you'll want to package php with your app (and GD installed already), of which I'm not sure the legality. (but there's probably some way to get it done)
90% GD - 10% ImageMagick
Windows - Yes
Linux/MAC - No (but fairly easy to install)

Categories