How to properly compile PHP with JPEG support?
Posted: Sun Jan 16, 2011 2:41 am
Has anyone installed configured PHP to support GD and JPEG? I'm having trouble calling some of the GD image functions (ie ImageCreateFromJpeg) and am wondering which step along the install process is causing the problem.
I first did the following to compile my JPEG library.
wget http://www.ijg.org/files/jpegsrc.v8b.tar.gz
gunzip jpegsrc.v8b.tar.gz
tar xvf jpegsrc.v8b.tar
cd jpeg-8b
./configure --enable-shared
make
make install
The following files were installed afterward.
/usr/local/lib/libjpeg.a
/usr/local/lib/libjpeg.la
/usr/local/lib/libjpeg.so -libjpeg.so.8.0.2
/usr/local/lib/libjpeg.so.8 -libjpeg.so.8.0.2
/usr/local/lib/libjpeg.so.8.0.2
Since it's a 64-bit OS, I copied them to the lib64 folder by using the following:
cp -rp /usr/local/lib/*jpeg* /usr/local/lib64/.
Then I did the following to compile my PHP.
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysqli=mysqlnd --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysql-sock=/var/lib/mysql --with-libdir=lib64 --with-zlib' ' --with-gd --with-jpeg-dir=/usr/local
Are there anything wrong with what I've done?
I'm seeing the following when I "make install" for PHP.
libtool: install: warning: remember to run `libtool --finish /usr/local/src/php-5.3.2/libs'
You may want to add: /usr/local/lib/php to your php.ini include_path
So I did "libtool --finish /usr/local/src/php-5.3.2/libs" and "service httpd restart" but still am having issues. Any ideas?
I first did the following to compile my JPEG library.
wget http://www.ijg.org/files/jpegsrc.v8b.tar.gz
gunzip jpegsrc.v8b.tar.gz
tar xvf jpegsrc.v8b.tar
cd jpeg-8b
./configure --enable-shared
make
make install
The following files were installed afterward.
/usr/local/lib/libjpeg.a
/usr/local/lib/libjpeg.la
/usr/local/lib/libjpeg.so -libjpeg.so.8.0.2
/usr/local/lib/libjpeg.so.8 -libjpeg.so.8.0.2
/usr/local/lib/libjpeg.so.8.0.2
Since it's a 64-bit OS, I copied them to the lib64 folder by using the following:
cp -rp /usr/local/lib/*jpeg* /usr/local/lib64/.
Then I did the following to compile my PHP.
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysqli=mysqlnd --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysql-sock=/var/lib/mysql --with-libdir=lib64 --with-zlib' ' --with-gd --with-jpeg-dir=/usr/local
Are there anything wrong with what I've done?
I'm seeing the following when I "make install" for PHP.
libtool: install: warning: remember to run `libtool --finish /usr/local/src/php-5.3.2/libs'
You may want to add: /usr/local/lib/php to your php.ini include_path
So I did "libtool --finish /usr/local/src/php-5.3.2/libs" and "service httpd restart" but still am having issues. Any ideas?