Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

As the title says, I'm getting the above error in my Apache log files when calling

imagecreatefromjpeg()

in PHP.

Running:

apt-get install libjpeg62-dev

Tells me that it is already at the latest version.

libjpeg.so.62

Also exists in /usr/lib

(Running Ubuntu)

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Make sure that /usr/lib/libjpeg.so.62 actually is the file you think it is (ie not been overwritten by something/someone) Something like: for f in find . -type f -name "*jpeg*" ; do md5sum $f | uniq ; done would be a good start (you seem to have another version of libjpeg, thus the error)

share|improve this answer

Try to find the gd.so file used by php for the gd functions (if it is installed with ubuntu packages it should be in /usr/lib/php5/20060613) and type:

ldd gd.so

you will see all shared libraries that the object is using:

linux-vdso.so.1 =>  (0x00007fff8f7ed000)
libgd.so.2 => /usr/lib/libgd.so.2 (0x00007f813cfcc000)
libt1.so.5 => /usr/lib/libt1.so.5 (0x00007f813cd6f000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f813caea000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f813c7de000)
libXpm.so.4 => /usr/lib/libXpm.so.4 (0x00007f813c5cd000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00007f813c3a7000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f813c190000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00007f813bf6e000)
libc.so.6 => /lib/libc.so.6 (0x00007f813bc1a000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f813b9e5000)
libm.so.6 => /lib/libm.so.6 (0x00007f813b762000)
libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0x00007f813b560000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f813b344000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f813b140000)
/lib64/ld-linux-x86-64.so.2 (0x00007f813d43a000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f813af16000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f813ad14000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f813ab0f000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f813a8f2000)

Check if libjpeg heads to the right version. If not, you should figure out why (hint LIBRARY_PATH)

share|improve this answer
    
The relevant line from that output on my server: libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00007f1abecb5000) –  Oli Aug 17 '10 at 9:09
    
this looks good. So either your php isn't using this gd.so or apache has a different load path which has the 80 version before the 62. –  hellvinz Aug 17 '10 at 10:52
    
Any pointers as to where to look next? –  Oli Aug 17 '10 at 16:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.