phalcon/cphalcon · error · Phalcon\Image\Exceptions\VersionMismatch
Phalcon\Image\Adapter\GD requires GD version '2.0.1' or…
Error message
Phalcon\Image\Adapter\GD requires GD version '2.0.1' or greater, you have {version} What it means
Thrown by the private Gd::check() routine right after the adapter resolves the installed GD version via getVersion(): version_compare reports the runtime GD is older than the minimum supported '2.0.1', so the adapter refuses to operate. The input at fault is the environment's GD library version string (embedded into the exception message), not anything passed by the application.
Solutions
- Upgrade the GD extension/library to version 2.0.1 or newer (any modern PHP bundle satisfies this; on Debian/Ubuntu install php-gd, on Alpine php*-gd) and restart the PHP process
- Switch the image adapter to Phalcon\Image\Adapter\Imagick if the Imagick extension is available and GD cannot be upgraded
- Verify with gd_info() or phpinfo() which GD version is actually loaded after upgrading, to confirm the fix took effect
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at phalcon/Image/Adapter/Gd.zep:924 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21).
Data as JSON: /api/errors/22a7b53b5d49765d.
Report an issue: GitHub.
Appendix: source
Thrown at phalcon/Image/Adapter/Gd.zep:924
0,
width,
height
);
}
/**
* Checks the installed version of GD
*
* @throws Exception
*/
private function check() -> void
{
var version;
let version = this->getVersion();
if (true !== version_compare(version, "2.0.1", ">=")) {
throw new VersionMismatch(version);
}
}
}
View on GitHub (pinned to b7419de9cd)