LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   JPEG support for PHP5 GD on RHEL 5 (https://www.linuxquestions.org/questions/linux-software-2/jpeg-support-for-php5-gd-on-rhel-5-a-736977/)

beac0n 07-01-2009 10:58 AM

JPEG support for PHP5 GD on RHEL 5
 
Hello,
I am currently running Apache2/PHP 5.2.9 on a x86_64 version of RHEL 5. I am trying to get JPEG support for GD installed. This the ./configure command I am using for compiling php"

./configure --prefix=/usr/local/apache2/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-gd --with-png-dir=/usr/lib64 --with-jpeg-dir=/usr/lib64 --with-zlib-dir=/usr/lib64

I have installed the libpng-devel and libjpeg-devel rpms. When compiling php I receive no errors in the ./configure, make, and make install commands.

I stop and restart apache without problems, but the GD block in PHP info does not have the line for JPEG support:

gd
GD Support enabled
GD Version bundled (2.0.34 compatible)
GIF Read Support enabled
GIF Create Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

Thanks,
brian.

bathory 07-03-2009 12:12 AM

What is the output of:
Code:

ldd /usr/local/apache2/php/bin/php

beac0n 07-07-2009 10:41 AM

Quote:

Originally Posted by bathory (Post 3595116)
What is the output of:
Code:

ldd /usr/local/apache2/php/bin/php

The ./configure statement is actually this. The one I inputted above was from a different attempt (also not successful). This is the most recent compilation:

./configure --prefix=/usr/local/apache2/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-gd --with-png-dir=/usr/local/lib --with-jpeg-dir=/usr/local/lib --with-zlib-dir=/usr/lib64



ldd /usr/local/apache2/php/bin/php
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x000000390ac00000)
librt.so.1 => /lib64/librt.so.1 (0x00000038fbe00000)
libmysqlclient.so.16 => /usr/local/mysql/lib/mysql/libmysqlclient.so.16 (0x00002ba3be275000)
libm.so.6 => /lib64/libm.so.6 (0x00000038fae00000)
libz.so.1 => /usr/lib64/libz.so.1 (0x00000038fba00000)
libpng12.so.0 => /usr/local/lib/libpng12.so.0 (0x00002ba3be4ef000)
libjpeg.so.62 => /usr/local/lib/libjpeg.so.62 (0x00002ba3be714000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00000038ffa00000)
libdl.so.2 => /lib64/libdl.so.2 (0x00000038fb200000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00000038fd600000)
libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x0000003902a00000)
libc.so.6 => /lib64/libc.so.6 (0x00000038faa00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00000038fb600000)
/lib64/ld-linux-x86-64.so.2 (0x00000038fa600000)

bathory 07-07-2009 04:21 PM

Doh, maybe it's because you have mixed 32 and 64bit libraries. You can try the Centos dev package, or try this, to compile it for a 64bit arch.

Hope that helps.

beac0n 07-08-2009 10:05 AM

Problem solved.
 
Thanks for your help. I solved the problem. As usual with me it was user error. I wasn't doing a 'make clean' before running the ./configure command. I did a 'make clean' and ran the ./configure pointing to the correct 64-bit libs for png and jpeg and the 'make' and 'make install' worked and I got JPG support.

I didn't think that not doing 'make clean' would matter, but it did.


All times are GMT -5. The time now is 04:49 PM.