Welcome to WebmasterWorld Guest from 54.209.227.199

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Using bundled version of GD2 with PHP5

Advice please on obtaining & installing libs?

     
12:13 am on Mar 25, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 3, 2005
posts:67
votes: 0


Sorry if this has been mentioned before but I cant see anything.

Before we start Im on a Unix system not Windows.

I want to use GD2 and I believe PHP5 comes with GD2, and to use it you do --with-gd ?

Well I do this
./configure \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql=/usr/local/mysql/ \
--with-gd \
--disable-libxml

and part way through the configure output it says

checking for GD support... yes
checking for the location of libjpeg... no
checking for the location of libpng... no

a bit later on it stops and coughs out the following

configure: error: libpng.(a¦so) not found.

As I understand it, GD2 is bundled with PHP but libpng & libjpeg which are needed to make it work aren't, which seems rather stupid.

Why bundle something as a "convinience" when you still have to manually obtain & install extra bits to make it work!

Can someone please point me in the direction of an overview of how to get these libraries and set them up so GD can use them?

Thanks

12:15 pm on Mar 25, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 19, 2003
posts:1001
votes: 0


Php wouldn't go installing these libraries for you because many users will already have them installed. If you don't have them installed, most linux installations will have a package management system like apt, rpm or yast which will check to see what you need, and install them for you.
- if you already had them, you could bork things up
- it would also make a lot of extra bandwidth for people who already have them installed.
On the main image functions page, [php.net...] , you'll find links to places where you can get these libraries if you don't have a package management system on your box.
You'll also want to get freetype.
Have fun with gd, you can do lots of groovy stuff with it.
10:43 pm on Mar 27, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 3, 2005
posts:67
votes: 0


Do I need to specify the location of the libs using ./configure or will it find them itself?

Also, once PHP has been compiled can I delete the libs or are they still needed?

Thanks
AW

3:16 am on Mar 28, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 19, 2003
posts:1001
votes: 0


I think you'll have to keep them once installed.
You can check out [php.net...] for config directives - where it says (...)=DIR, you need to specify the directory; if there's a [=DIR), this is an optional parameter, so it might be auto-findable.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members