Hi

I have PHP 4.1 running. Now I tried to set up the PNG support. So I recompiled PHP using

./configure --with-mysql --with-zlib-dir=/usr/lib --with-png-dir=/opt/libpng-1.2.1 --with-gd=/opt/gd-1.8.1 --with-apxs

the result of the following code is not what I want!

Code:
$im = ImageCreateFromPNG("test.png");

Result:
ImageCreateFromPng: No PNG support in this PHP build

PHPInfo returns the following:

GD Support enabled
GD Version 1.6.2 or higher

nothing about PNG like others described it.

what is wrong? I got no errors when building PHP.

Thanx

Dominik Nufer

    • [deleted]

    try setting the PNG and GD directories to /usr/local

    Also, capture the output of the configure and make processes, and see if there are any errors or warnings in them.

      4 months later

      Hello

      When recompiling PHP with GD support, you must first remove config.cache in the PHP source directory before you run your ./configure. Otherwise PHP may list that you have GD support, but not that you have support for PNG images.

        Write a Reply...