[solved] Can't get GD support working

Discussion in 'PHP' started by Egon, Jul 14, 2013.

  1. Egon

    Egon Member

    I'm running LiteSpeed on Debian 6 Squeeze. I've installed the Apt-Get packages php5-gd, libpng-dev and libjpeg-dev. The libgd packages, I see mentioned on the web, aren't found by Apt-Get.

    When I configure PHP with --with-gd or --with-gd-dir=..., LiteSpeed doesn't seem able to install PHP with GD support.

    Does anyone here know how I can get GD working under Debian 6 Squeeze??? Could you please tell me? :D
    Last edited by a moderator: Jul 19, 2013
  2. Egon

    Egon Member

    When I build PHP, using the LiteSpeed web console, it tells me GD support yes. But when I try an app like Piwik, for example, it says there is no GD.

    How do I fix this?
  3. webizen

    webizen Well-Known Member

    according to php doc (http://www.php.net/manual/en/image.installation.php),

    you need below in the compile option and make sure needed library are installed.
    --with-gd \
    [ --with-jpeg-dir=/usr \ ]
    [ --with-png-dir=/usr \ ]
    [ --with-zlib-dir=/usr \ ]

    and check phpinfo page to make sure gd is enabled.
    Last edited: Jul 15, 2013
  4. Egon

    Egon Member

    Done that. Php info tells me gd is installed, with png, jpg and all others enabled.
    Still any web app I try to install, tell me no gd.
    Haven't had this problem before, seems a LiteSpeed thing as far as I can judge (with all my noobyness).
  5. webizen

    webizen Well-Known Member

    go through piwik code and find below in core/Piwki.php:

        static public function isGdExtensionEnabled()
            static $gd = null;
            if (is_null($gd)) {
                $extensions = @get_loaded_extensions();
                $gd = in_array('gd', $extensions) && function_exists('imageftbbox');
            return $gd;
    according to php doc (http://php.net/manual/en/function.imageftbbox.php), freetype support is required.
    iow, need '--with-freetype-dir=DIR' in compile option. So it is not an lsws issue.
  6. Egon

    Egon Member

    Thank you so much. Freetype was what was missing. All is good now :).

Share This Page