Web Hosting Talk







View Full Version : Recompiling PHP 4.0.6


allera
11-02-2001, 02:11 PM
I'm trying to recompile php 4.0.6 on a linux machine to support GD with PNG and JPEG. Here are my steps:

Install libpng-1.0.12 (1.2.0 won't allow apache to restart(
Install jpeg-v6b
Install zlib-1.1.3
Install gd-1.2.0 (I tried 1.8.4 with the same results)

Install PHP with the following configure string:

./configure --with-apxs=/usr/sbin/apxs --with-config-file-path=/etc/apache --enable-versioning --with-system-regex --disable-debug --enable-track-vars --enable-pear --with-mysql --with-gd=../gd-2.0.1 --enable-force-cgi-redirect --with-gettext --with-mysql=/usr --enable-ftp --with-gettext=/usr --with-zlib-dir=../zlib-1.1.3 --with-jpeg-dir=/usr/local --with-png-dir=../libpng-1.0.12

It compiles without a hitch, the configure output shows it finds the png and jpeg files just fine and looks like it does GD just fine too. Apache restarts without a hitch.

The problem lies with phpinfo();. Here is the output:

gd
GD Support enabled
GD Version 1.6.2 or higher
WBMP Support enabled

I cannot figure out what I'm doing wrong for it not to pick up the PNG and JPEG support. Another one of our servers runs php 4.0.6 with PNG and JPEG support nicely -- but it's FreeBSD. GD was done from ports...

Anyone have any ideas as to why PHP isn't seeing the GD PNG JPEG support?

nexcess.net
11-02-2001, 05:50 PM
this post may help:

http://www.webhostingtalk.com/showthread.php?threadid=24951&goto=newpost

Chris

allera
11-02-2001, 06:11 PM
Yes, I double checked all that stuff already. The correct phpinfo(); page shows up, the module has the correct date/time stamp, it's just not doing png and jpeg for some reason. I also tested it with an ImageType function to see if it does support PNG but just not displaying it in phpinfo(); for some wacked reason -- nope, no support.

nexcess.net
11-02-2001, 06:17 PM
did you edit the gd Makefile and comment in/out the correct options PNG/JPEG etc? It could be that everything is compiled correctly but just that gd is not aware of PNG/JPEGS because of this..

also, are there any old libgd*.a or libgd*.so libs hanging out in /usr/lib (or whereever you installed gd) sometimes that screws things up.

I remember having to complete obliterate any libgd*.a/so stuff in /usr/lib and then re-configure/make/make install php so it would work right.

Chris