phalcon/cphalcon · error · Phalcon\Image\Exceptions\ExtensionNotLoaded
GD is not installed, or the extension is not loaded
Error message
GD is not installed, or the extension is not loaded
What it means
Thrown inside Gd::getVersion when the helper phpFunctionExists('gd_info') reports that the GD function is unavailable — i.e. the GD extension is not installed or not loaded in this PHP runtime. Because every operation in the GD image adapter depends on GD, this guard aborts any version detection (and thus adapter use) until the extension is enabled.
Solutions
- Install/enable the GD extension (e.g. apt install php-gd) and restart PHP
- Use the Imagick adapter as an alternative when GD cannot be installed
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at phalcon/Image/Adapter/Gd.zep:179 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/7ad82c3b6b9da756.
Report an issue: GitHub.
Appendix: source
Thrown at phalcon/Image/Adapter/Gd.zep:179
* load-or-create ambiguity of the constructor.
*
* @phpstan-return AbstractAdapter<GdImage>
* @throws Exception
*/
public static function create(int width, int height) -> <AbstractAdapter>
{
return new self("", width, height);
}
/**
* @throws Exception
*/
public function getVersion() -> string
{
var info, matches, reported, version;
if (true !== this->phpFunctionExists("gd_info")) {
throw new ExtensionNotLoaded("GD");
}
let version = "";
if (defined("GD_VERSION")) {
let version = GD_VERSION;
} else {
let info = gd_info();
let matches = null;
/** @var string $reported */
let reported = info["GD Version"];
if (
preg_match(
"/\\d+\\.\\d+(?:\\.\\d+)?/",
reported,
matchesView on GitHub (pinned to b7419de9cd)