0
votes

I installed PHP GD via aptitude and it's showing as installed there. but phpinfo doesn't show it.

This is the error which I can see when I executed php -m from command prompt:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/gd.so' - /usr/lib/php5/20090626+lfs/gd.so: undefined symbol: gdImageCreateFromJpeg in Unknown on line 0

I've tried reinstalling, restarting, etc, but of no use...

2

2 Answers

0
votes

On the GD website it says:

If you get undefined symbol errors, be sure to check for older versions of libpng in your library directories!

See http://www.boutell.com/gd/manual2.0.1.html

0
votes

In my case I had the old version of libgd.so in /usr/local/lib/ which was picked first in path. Renaming the directory to something else forced PHP to look for the file further and found the correct file in /usr/lib/. Linking to libgd.so to the right version should help too.