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.

About Adriano Laranjeira

Software engineer & developer See more at http://about.me/arglbr
This entry was posted in English and tagged . Bookmark the permalink.

1 Response to Error compiling PHP with GD support

  1. Pingback: Adriano Laranjeira » Blog Archive » Erro ao compilar o PHP com suporte ao GD

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s