Yii 2 Imagine driver

installed using php composer.phar require --prefer-dist yiisoft/yii2-imagine

php gd enabled

Any ideas?



    "name": "Invalid Configuration",

    "message": "Your system does not support any of these drivers: gmagick,imagick,gd2",

    "code": 0,

    "type": "yii\\base\\InvalidConfigException",

    "file": "/var/www/rapidassign/vendor/yiisoft/yii2-imagine/BaseImage.php",

    "line": 106,

    "stack-trace": [

        "#0 /var/www/rapidassign/vendor/yiisoft/yii2-imagine/BaseImage.php(64): yii\\imagine\\BaseImage::createImagine()",

        "#1 /var/www/rapidassign/vendor/yiisoft/yii2-imagine/BaseImage.php(134): yii\\imagine\\BaseImage::getImagine()",

        "#2 /var/www/rapidassign/api/modules/v1/controllers/AccountController.php(776): yii\\imagine\\BaseImage::crop('path/to/image.j...', 100, 100)",

        "#3 [internal function]: api\\modules\\v1\\controllers\\AccountController->actionAvatarupload('dda64e54-e954-1...')",

        "#4 /var/www/rapidassign/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array)",

        "#5 /var/www/rapidassign/vendor/yiisoft/yii2/base/Controller.php(151): yii\\base\\InlineAction->runWithParams(Array)",

        "#6 /var/www/rapidassign/vendor/yiisoft/yii2/base/Module.php(455): yii\\base\\Controller->runAction('avatarupload', Array)",

        "#7 /var/www/rapidassign/vendor/yiisoft/yii2/web/Application.php(83): yii\\base\\Module->runAction('v1/account/avat...', Array)",

        "#8 /var/www/rapidassign/vendor/yiisoft/yii2/base/Application.php(375): yii\\web\\Application->handleRequest(Object(yii\\web\\Request))",

        "#9 /var/www/rapidassign/api/index.php(21): yii\\base\\Application->run()",

        "#10 {main}"



It should be a server issue.

You need to install one of the module


Additional to this:

You can execute the "requirements.php" in your app-root directory.

Then you will see if everything yii needs is installed correctly.


Hi this is my requirements.php output, seems like GD and imagick are working

Yii Application Requirement Checker

This script checks if your server configuration meets the requirements

for running Yii application.

It checks if the server is running the right version of PHP,

if appropriate PHP extensions have been loaded, and if php.ini file settings are correct.

Check conclusion:


PHP version: OK

Reflection extension: OK

PCRE extension: OK

SPL extension: OK

MBString extension: OK

OpenSSL extension: OK

Intl extension: WARNING!!!

Required by: Internationalization support

Memo: PHP Intl extension 1.0.2 or higher is required when you want to use advanced parameters formatting

        in Yii::t(), non-latin languages with Inflector::slug(),

        IDN-feature of

        EmailValidator or UrlValidator or the yii\i18n\Formatter class.

ICU version: WARNING!!!

Required by: Internationalization support

Memo: ICU 49.0 or higher is required when you want to use # placeholder in plural rules

        (for example, plural in


        Formatter::asRelativeTime()) in the yii\i18n\Formatter class. Your current ICU version is INTL_ICU_VERSION.

Fileinfo extension: OK

DOM extension: OK

PDO extension: OK

PDO SQLite extension: WARNING!!!

Required by: All DB-related classes

Memo: Required for SQLite database.

PDO MySQL extension: OK

PDO PostgreSQL extension: WARNING!!!

Required by: All DB-related classes

Memo: Required for PostgreSQL database.

Memcache extension: WARNING!!!

Required by: MemCache

APC extension: WARNING!!!

Required by: ApcCache

GD PHP extension with FreeType support: OK

ImageMagick PHP extension with PNG support: OK

Expose PHP: WARNING!!!

Required by: Security reasons

Memo: "expose_php" should be disabled at php.ini

PHP allow url include: OK



Errors: 0   Warnings: 7   Total checks: 21

Have you by any chance override Image::$driver?

Look at this method https://github.com/yiisoft/yii2-imagine/blob/master/BaseImage.php#L83