{"record":{"id":"7ad82c3b6b9da756","repo":"phalcon/cphalcon","slug":"gd-is-not-installed-or-the-extension-is-not-loade","errorCode":null,"errorMessage":"GD is not installed, or the extension is not loaded","messagePattern":"GD is not installed, or the extension is not loaded","errorType":"exception","errorClass":"Phalcon\\Image\\Exceptions\\ExtensionNotLoaded","httpStatus":null,"severity":"error","filePath":"phalcon/Image/Adapter/Gd.zep","lineNumber":179,"sourceCode":"     * load-or-create ambiguity of the constructor.\n     *\n     * @phpstan-return AbstractAdapter<GdImage>\n     * @throws Exception\n     */\n    public static function create(int width, int height) -> <AbstractAdapter>\n    {\n        return new self(\"\", width, height);\n    }\n\n    /**\n     * @throws Exception\n     */\n    public function getVersion() -> string\n    {\n        var info, matches, reported, version;\n\n        if (true !== this->phpFunctionExists(\"gd_info\")) {\n            throw new ExtensionNotLoaded(\"GD\");\n        }\n\n        let version = \"\";\n\n        if (defined(\"GD_VERSION\")) {\n            let version = GD_VERSION;\n        } else {\n            let info    = gd_info();\n            let matches = null;\n\n            /** @var string $reported */\n            let reported = info[\"GD Version\"];\n\n            if (\n                preg_match(\n                    \"/\\\\d+\\\\.\\\\d+(?:\\\\.\\\\d+)?/\",\n                    reported,\n                    matches","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Image/Adapter/Gd.zep#L161-L197","documentation":"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.","triggerScenarios":"Thrown at phalcon/Image/Adapter/Gd.zep:179 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","contentChangedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}