LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 07-01-2009, 11:58 AM   #1
beac0n
LQ Newbie
 
Registered: Jul 2009
Posts: 3

Rep: Reputation: 0
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.
 
Old 07-03-2009, 01:12 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,976

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
What is the output of:
Code:
ldd /usr/local/apache2/php/bin/php
 
Old 07-07-2009, 11:41 AM   #3
beac0n
LQ Newbie
 
Registered: Jul 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
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)
 
Old 07-07-2009, 05:21 PM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,976

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
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.
 
Old 07-08-2009, 11:05 AM   #5
beac0n
LQ Newbie
 
Registered: Jul 2009
Posts: 3

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS/RHEL & PHP5 support riluve Linux - Newbie 4 05-01-2007 09:18 AM
JPEG Support Ben.d Linux - General 3 03-10-2004 08:43 AM
no jpeg support arrruken Linux - Software 1 03-03-2004 02:11 AM
Trouble compiling JPEG support with PHP MusicmanAN Programming 0 05-13-2001 06:08 PM
How to build jpeg support into PHP Larry James Programming 4 10-14-2000 07:10 PM


All times are GMT -5. The time now is 10:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration