Ubuntu: 16.04 LTS
I quite don't understand what's going wrong. I've installed Intervention from as guided here
Then I created the following .php file and started my localhost Apache server and tested the results and it worked!
Here's the code:
<?php require 'vendor/autoload.php'; use Intervention\Image\ImageManagerStatic as Image; Image::configure(array('driver' => 'gd')); $image = Image::make('ar.jpg'); $path = 'public/images/photoh.png'; $image->save($path); ?>
But when I run the same file using
php test.php in Ubuntu terminal, I get the following error:
GD Library extension not available with this PHP installation.
When I checked the phpinfo(), I saw gd being listed there with version 2.1.0
This is not the real issue, but still I would like to know what can be wrong and how can I solve it.
Then comes the real problem. I installed Imagick separately using following command:
sudo apt-get install php-imagick
This installed Imagick 6.8 on my system (I checked this using convert -version)
Then I added following to php.ini file:
And then for testing, I changed the driver to 'imagick' in test.php and executed it using php in terminal and it worked fine.
But I want it to work on browser, like GD, but IT DIDN'T.
It showed the similar error that GD showed on terminal:
ImageMagick module not available with this PHP installation.
So it seems like ImageMagick is installed but something is missing. I think it has something to do with the native PHP 7 that comes with Ubuntu. I have tried at least 50 solutions during last month but couldn't solve this problem :(
Is there something I can do?