LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-12-2004, 10:07 AM   #1
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Rep: Reputation: 30
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

Last edited by Seventh; 01-12-2004 at 10:59 AM.
 
Old 01-12-2004, 01:06 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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
 
Old 01-12-2004, 01:19 PM   #3
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
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)
 
Old 01-12-2004, 03:05 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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
 
Old 01-13-2004, 08:33 AM   #5
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
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.
 
Old 01-13-2004, 02:40 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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
 
Old 03-02-2004, 12:15 AM   #7
avirup dasgupta
Member
 
Registered: Aug 2003
Distribution: Redhat , Fedora Core4, DSL,Solaris
Posts: 49

Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create an alias (apache) to point to a cd-rom/dvd verlossen Linux - Networking 1 11-20-2005 04:50 PM
Apache 1.3.33 (debian built) and Apache SSL does not respond to the proper ports lqorg_user Linux - Networking 0 11-06-2005 05:11 PM
Apache + SSL + Upgrading OpenSSL shared lib TruckStuff Linux - Security 2 07-06-2005 06:41 PM
2 domains point on the same apache dominant Linux - General 1 03-29-2004 03:04 AM
Cannot load /usr/lib/apache/libphp4.so into server jmnovak Linux - General 3 07-01-2002 11:52 AM


All times are GMT -5. The time now is 06:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration