Error compiling PHP with GD support

Você pode ler este post em português também.

Hi Folks! If you try to compile PHP with the –with-gd in a system that has 1.4 or higher version of libpng, you will have a compilation error. The solution until the PHP developers does not release the next stable version with the fix is very simple, but requires that you change one line in the source code of PHP. Short way:

• Open the file ext/gd/libgd/gd_png.c, go to the line 148 and you will find this: if (!png_check_sig (sig, 8)) { /* bad signature */

• Comment it (better) or remove it (worse), replacing with this: if (png_sig_cmp (sig, 0, 8)) { /* bad signature */

If you want to know all the details, visit this page at PHP website.

Published At (Updated At)
Tagged with