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

Error "GD is not installed, or the extension is not loaded" thrown in phalcon/cphalcon.

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,
                    matches

View on GitHub (pinned to b7419de9cd)

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.