Configuring PHP with GD and JPEG support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Questions with regards to compiling PHP to support GD with JPEG on 64-bit CentOS 5.5.

1) Specifying folder for jpeg library
When I execute the following command, am I saying the full path to libdir is at /usr/source/lib64?
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-gd --with-jpeg-dir=/usr/source --with-libdir=lib64

Should I have done the following instead?
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-gd --with-jpeg-dir=/usr/source/lib64


2) After copying the compiled JPEG libraries to the the lib64 directory, PHP is still unable to call the GD functions (ie ImageCreateFromJpeg) properly.
Once I've done the following.
./configure --enable-shared
make
make install

I have the following files installed.  Meanwhile the /usr/local/lib64 directory doesn't have these files.  Despite copying the whole set to /usr/local/lib64, the above configure command still doesn't work.
/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

The following displays a blank page on my Firefox.
<?php
header('Content-Type: image/jpeg');
  $image_file_path = '/usr/local/apache2/htdocs/image.jpg';
  $image_file_path";
  $im = @ImageCreateFromJpeg($image_file_path)";
  echo "$im";
  imagejpeg($im);
  echo "End: imagedestroy($im)";
?>

 		 	   		  

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux