Can't display images, something worng with JPEG library

Trouble during PacsOne Server installations
Post Reply
xunileca
Posts:13
Joined:Tue Oct 27, 2009 7:22 pm
Can't display images, something worng with JPEG library

Post by xunileca » Wed Feb 15, 2012 10:00 pm

Getting the following error when trying to view images.
JPEG parameter struct mismatch: library thinks size is 520, caller expects 512

OS is linux 64bit php is 5.3.3-7

Ran the premium-6.3.3 install and used ldd to check all so files in /usr/local/lib
Also made sure the php image magick extension is not loaded or even installed

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Thu Feb 16, 2012 6:08 pm

The error suggests there is a conflicting JPEG shared library installed on this server, so can you run the following from a local command shell?

Code: Select all

# find / -name jpeg.so -print
There should be only a single copy of this shared library, which comes with the PacsOne Server installation package and should be installed under "/usr/local/lib/ImageMagick-5.5.6/modules/coders/" by default.

xunileca
Posts:13
Joined:Tue Oct 27, 2009 7:22 pm

Multiple files found

Post by xunileca » Thu Feb 16, 2012 8:23 pm

/usr/local/lib/ImageMagick-5.5.6-Q16/modules/coders/.libs/jpeg.so
/usr/local/lib/ImageMagick-5.5.6-Q16/modules/coders/jpeg.so
/usr/lib/ImageMagick-6.6.0/modules-Q16/coders/jpeg.so
/usr/lib/imlib2/loaders/jpeg.so

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Thu Feb 16, 2012 11:19 pm

You need to find out what package the latter 2 files belong to and remove/un-install those packages, since they have conflicts with the jpeg.so shared library that comes with the PacsOne Server installtion package:

/usr/lib/ImageMagick-6.6.0/modules-Q16/coders/jpeg.so
/usr/lib/imlib2/loaders/jpeg.so

xunileca
Posts:13
Joined:Tue Oct 27, 2009 7:22 pm

Post by xunileca » Fri Feb 17, 2012 2:46 pm

I found the offending packages and removed them:

find / -name jpeg.so -print
/usr/local/lib/ImageMagick-5.5.6-Q16/modules/coders/.libs/jpeg.so
/usr/local/lib/ImageMagick-5.5.6-Q16/modules/coders/jpeg.so

However, I am still getting the:
JPEG parameter struct mismatch: library thinks size is 520, caller expects 512
error is apache logs.

I even removed the /usr/local/lib/ImageMagick-5.5.6-Q16 directory, untarred and re-ran pacsone installation just to be sure.

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Fri Feb 17, 2012 4:03 pm

1. Did you restart Apache after removing those packages?

2. Can you run the following from a local command shell and check if any of the dependent shared library is missing?

Code: Select all

#ldd /usr/local/lib/libMagick-5.5.6-Q16.so.0.0.0

xunileca
Posts:13
Joined:Tue Oct 27, 2009 7:22 pm

Post by xunileca » Fri Feb 17, 2012 8:27 pm

Yes, I did re-start apache.

Here is the ldd output:
ldd /usr/local/lib/libMagick-5.5.6-Q16.so.0.0.0
linux-vdso.so.1 => (0x00007fffc71ff000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007fa2414b4000)
libSM.so.6 => /usr/lib/libSM.so.6 (0x00007fa2412ac000)
libICE.so.6 => /usr/lib/libICE.so.6 (0x00007fa241090000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fa240d55000)
libbz2.so.1 => /lib/libbz2.so.1 (0x00007fa240b45000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007fa24092d000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fa240711000)
libm.so.6 => /lib/libm.so.6 (0x00007fa24048f000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007fa240206000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fa240002000)
libc.so.6 => /lib/libc.so.6 (0x00007fa23fca1000)
libuuid.so.1 => /lib/libuuid.so.1 (0x00007fa23fa9c000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007fa23f880000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa241a37000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fa23f67c000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fa23f477000)

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Sat Feb 18, 2012 1:08 am

Can you post the detailed settings of the ImageMagick PHP extension from the HTML output of the test page?

http://localhost/pacsone/Hello.php

xunileca
Posts:13
Joined:Tue Oct 27, 2009 7:22 pm

Post by xunileca » Tue Feb 21, 2012 1:20 pm

imagick
ImageMagick support enabled
Magick Backend ImageMagick
ImageMagick version 5.5.6
PHP imagick version 0.9.11
MaxRGB 65535
Supported image formats IMPLICIT
Font Family - Name AvantGarde - AvantGarde-Book
Font Family - Name AvantGarde - AvantGarde-BookOblique
Font Family - Name AvantGarde - AvantGarde-Demi
Font Family - Name AvantGarde - AvantGarde-DemiOblique
Font Family - Name Bookman - Bookman-Demi
Font Family - Name Bookman - Bookman-DemiItalic
Font Family - Name Bookman - Bookman-Light
Font Family - Name Bookman - Bookman-LightItalic
Font Family - Name Courier - Courier
Font Family - Name Courier - Courier-Bold
Font Family - Name Courier - Courier-Oblique
Font Family - Name Courier - Courier-BoldOblique
Font Family - Name Helvetica - Helvetica
Font Family - Name Helvetica - Helvetica-Bold
Font Family - Name Helvetica - Helvetica-Oblique
Font Family - Name Helvetica - Helvetica-BoldOblique
Font Family - Name Helvetica Narrow - Helvetica-Narrow
Font Family - Name Helvetica Narrow - Helvetica-Narrow-Oblique
Font Family - Name Helvetica Narrow - Helvetica-Narrow-Bold
Font Family - Name Helvetica Narrow - Helvetica-Narrow-BoldOblique
Font Family - Name NewCenturySchlbk - NewCenturySchlbk-Roman
Font Family - Name NewCenturySchlbk - NewCenturySchlbk-Italic
Font Family - Name NewCenturySchlbk - NewCenturySchlbk-Bold
Font Family - Name NewCenturySchlbk - NewCenturySchlbk-BoldItalic
Font Family - Name Palatino - Palatino-Roman
Font Family - Name Palatino - Palatino-Italic
Font Family - Name Palatino - Palatino-Bold
Font Family - Name Palatino - Palatino-BoldItalic
Font Family - Name Times - Times-Roman
Font Family - Name Times - Times-Bold
Font Family - Name Times - Times-Italic
Font Family - Name Times - Times-BoldItalic
Font Family - Name Symbol - Symbol

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Tue Feb 21, 2012 4:16 pm

The ImageMagick PHP extension that comes with PacsOne Server is version 0.9.5, but the one installed on your server is version 0.9.11, so you seemed to have the wrong ImageMagick PHP extension installed.

You'll need to remove the current ImageMagick PHP extension, find out where it was installed from (most likely a regular ImageMagick package) and remove that package, then re-install the ImageMagick PHP extension that comes with the PacsOne Server installation package.

Post Reply