LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to point Apache to proper GD lib (https://www.linuxquestions.org/questions/linux-software-2/how-to-point-apache-to-proper-gd-lib-133973/)

Seventh 01-12-2004 09:07 AM

How to point Apache to proper GD lib
 
Background:

Redhat 9
Apache 2.0.48
PHP 4.3.4
GD version 2.0.17

So I have this PHP script that needs to use the function call:

'imagecreatetruecolor():'

Which requires GD 2.0.

GD 2.0 requires php 4.3.4 or better, which requires Apache 2.0.48 or higher (*grumbles about dependencies*).

Anyways. My Apache/PHP are the right version, and I compiled and installed the newest GD libraries.

I load my PHP script, and I get:

Warning: 'imagecreatetruecolor(): requires GD 2.0 or later in /var/www/html/index.php

Which in turn tosses a bunch of script errors, since that's the first part of the script that creates the files that the rest call.

So like, how do I "tell" Apache that GD2.0 is installed? It seems like it's not even realizing it's there.

TIA

Tinkster 01-12-2004 12:06 PM

It's not apache, apache doesn't know/care about
this graphics library ... PHP needs to be compiled
against the new version of GD.


Cheers,
Tink

Seventh 01-12-2004 12:19 PM

Hrm.. Maybe I should have put this into the newbie section - I'm not quite sure what the difference is.

Here's what I've done:

Download PHP

untar, ./configure, make, make install

Download GD 2.0x

untar, ./configure, make, make install


In that order. Is there a different way I should do it? I've since recompiled both a handful of times.

Thanks much (and my apologies again for the silly question)

Tinkster 01-12-2004 02:05 PM

Yep ... you got it the wrong way round :)

If you want PHP to be able to use GD2
it has to be present first, and depending
on your distro, and how paths and such
are set-up you may have to un-install the
older version of GD so PHP doesn't pick
that one up first.

The question isn't silly, and you probably
had no idea that there's all these differences.




Cheers,
Tink

Seventh 01-13-2004 07:33 AM

Awright, I'm catching on. :)

So I guess the next question is (I searched, fiddled, rtfm'd..). How do I go about uninstalling the two?

My course here would be to:
- Uninstall all versions of GD
- Uninstall PHP
- Reinstall GD
- Reinstall PHP

correct?

I tried rpm -abunchofdifferentarguments, but to no avail. Thanks very much once again, I swear I'll get this stuff down. :D

Tinkster 01-13-2004 01:40 PM

Heh ... good on yah, and yes, you
got that correct ... even though you
mighthave to also uninstall PHP, since
it's almost certain that your manual
compile and the RPM version from
RH will be in different locations.

Speaking of which ... you may want
to checkout checkinstall
http://checkinstall.izto.org/

It will allow you to use checkinstall
instead of "make install", create a
package (Slack, Deb or RPM) and
install it for you - that way the
dependency hell shouldn't become
too bad :) (I only use it for Slack, so
can't really say how well it will work
with RH rpms).


Cheers,
Tink

avirup dasgupta 03-01-2004 11:15 PM

Hi All,

Has anyone been successful in installing GD-2.0.22 in RH9?
Is it possible without uninstalling php?
I have been trying for the last few days..no success yet.
(I use Php:4.3.4)
Need help guys.

Avirup Dasgupta.


All times are GMT -5. The time now is 02:41 PM.