LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 03-04-2006, 10:20 PM   #1
vbsaltydog
Member
 
Registered: Nov 2005
Distribution: CentOS
Posts: 141

Rep: Reputation: 15
latest php version for RH9 ?


I am trying to use some web apps that require GD in PHP and even though php-4.2.2 says its compiles with gd support it isnt working for the web app or for gdinfo for that matter. I have fiddled around with mod_php and other gd support workarounds but nothing is working for me. I understand that php versions after 4.3.9 have GD support natively. I am trying to install the latest version of php that is supported by RH9 now but all I could find is php-4.3.11 src.rpm
I am looking for an rpm vs. a src.rpm for ease of administration purposes. Does anybody know the latest supported php version for RH9 with an rpm package? and a location of the download?

I will compile from the src if it is absolutely neccessary and if someone could offer assistance in the procedure as I am not experienced in compiling with options and I dont want to leave anything out during the build and have to recompile several times as this is a production server.

Thanks to all.
 
Old 03-04-2006, 11:38 PM   #2
this213
Member
 
Registered: Dec 2001
Location: ./
Distribution: Fedora, CentOS, RHEL, Gentoo
Posts: 167

Rep: Reputation: 34
What you need is the php-gd rpm for whichever version of PHP you're running (something like php-gd-4.3.11.rpm).

I'll take this chance to strongly urge you to update that machine with an operating system that is still supported. If you're used to RedHat, I'd suggest either CentOS or Fedora - in that order.

As with any RPM based distro, you never want to build packages from source on RH9 - rpm (the program) keeps a database of all installed packages and the only way you'll be able to install packages that rely on packages you've installed from source will be to either install those from source as well or pass rpm the --nodeps flag - which is a big NO.

If you must install a package from source - especially a package like PHP with lots of dependant packages - create an RPM from the source and install that RPM instead. If the package is a tarball with a spec file, you can build it with rpmbuild -tb packagename.tar.gz. If you're concerned about system performance, edit your spec files to include whatever configure flags you require.

PHP is at version 5 now. If you're going to update it, you should update to the most current stable version - otherwise, you're just putting off the inevitable. If you have to install from src.rpms, the following is the basic proceedure:

Code:
# rpm -ivh packagename.src.rpm
# cd /usr/src/redhat/SPECS
# ls (to see the name of the spec file
# rpmbuild -bb packagename.spec
# rpm -Uvh /usr/src/redhat/RPMS/{ARCH}/packagename.rpm
replace {ARCH} with your architecture.
 
Old 03-04-2006, 11:56 PM   #3
vbsaltydog
Member
 
Registered: Nov 2005
Distribution: CentOS
Posts: 141

Original Poster
Rep: Reputation: 15
Thank you for your thorough explanation. I have been toying with the idea of going to centos or fedora core4 for a while now but as I said in my original post, this is a production server and an OS migration is a whole lot of work vs. simply adding the gd support to RH9 and then building a current os server at a measured pace to avoid any downtime.

As to your suggestion, I have already attempted to find php-gd but was not able to locate an rpm for my php version (php-4.2.2-17).

Any other advise is still welcome.
 
Old 03-05-2006, 12:59 AM   #4
sunil.us.ranjith
LQ Newbie
 
Registered: Mar 2006
Posts: 1

Rep: Reputation: 0
Hai........
I'm new to LINUX, I need some PDF files through which I could come to know about linux.Also provide me some files to do my RHCE.

Thsnks & regards...
Sunil
 
Old 03-05-2006, 01:08 AM   #5
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
Quote:
Originally Posted by sunil.us.ranjith
Hai........
I'm new to LINUX, I need some PDF files through which I could come to know about linux.Also provide me some files to do my RHCE.

Thsnks & regards...
Sunil
Please start a new thread because your question is not related to whats being discussed in this thread.
 
Old 03-05-2006, 01:43 AM   #6
this213
Member
 
Registered: Dec 2001
Location: ./
Distribution: Fedora, CentOS, RHEL, Gentoo
Posts: 167

Rep: Reputation: 34
The stock RPM for php-4.2.2-17 should have gd enabled. How did you check to see if it was or not?

Try this: On the server, create a page with the following:
Code:
<?php
phpinfo();
?>
and name it something.php (like phpinfo.php), then hit it with a browser. Browse down the page (maybe half way) and see if you have a "gd" section. If you don't, make sure you have the gd rpm installed (rpm -qa | grep gd-). On the phpinfo page, check the configure options for --with-gd or --without-gd.

If you have gd installed and you don't have gd support, the best thing I could tell you to do is install the php-4.2.2-17.src.rpm from the RH 9 CD then open the spec file (php.spec at the location I pointed to earlier) and look at the ./configure line for it. If it's enabled there, build the RPM from that spec file, then:
Code:
# /etc/rc.d/init.d/httpd stop
# rpm -e --nodeps php
# rpm -Uvh --nodeps /usr/src/redhat/RPMS/{ARCH}/php.rpm
# /etc/rc.d/init.d/httpd start
Then check the phpinfo() page again.

Once you're through using it, be sure to remove the phpinfo() page.You really don't want this laying around for prying eyes to see.

Offhand, I would guess that you've got gd support and that it's just not a current enough version to support whatever it is you're trying to run. If this is indeed the case, you're going to have to back to square 1 and install the newest version of PHP and the php-gd package for that.

If you do have to go this route, you're going to have issues, period. While it may seem that php is just a component of apache, the fact is that this will cause you to have to upgrade apache as well - along with all of the packages associated with that, and all of the packages associated with those packages. This is what we call "Dependency Hell"
( http://en.wikipedia.org/wiki/Dependency_hell ).

If you do need to upgrade PHP, you might as well get the packages from a CentOS repository. The reason for this is that by doing so, you'll be able to slowly (or not so slowly) move your server from Redhat 9 to CentOS. I wouldn't recommend using yum for this on a production server though as you'll want to install the packages one (or a few) at a time and check to see what, if anything, breaks. One of the first things you'll want to update is going to be gcc. DO NOT install any of the packages with --nodeps, you're going to have to resolve any dependency issues that arise.


sunil.us.ranjith: Apparently, you're new to using forums too. Please don't tag topics with completely unrelated posts. Start a new posts for this.

Last edited by this213; 03-05-2006 at 01:46 AM.
 
Old 03-05-2006, 06:54 PM   #7
vbsaltydog
Member
 
Registered: Nov 2005
Distribution: CentOS
Posts: 141

Original Poster
Rep: Reputation: 15
Thanks for another excellent response. Very Thorough. Given all of the info that I have been given regarding this issue I have decided to upgrade the server os to a more recent edition. I have investigated the two recommended OSs from a previous post in this thread and decided to go with CentOS 4.
I have already built a second server on CentOS and am in the process of migrating the website files/directories/mysqldatabases now and will try to go live on the new server in a few days. I will update this thread with related issues as they develop but hopefully GD will work out of the box on the new server platform.

Thanks again for the detailed responses. It was a huge help.
 
  


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
Latest version of RHEL? Cheeseboy Red Hat 1 11-24-2004 08:42 AM
slackware latest version jxn Linux - Software 10 04-22-2004 05:21 AM
Latest PHP rpm for RH9 ducky Linux - Software 3 11-09-2003 06:53 PM
What is the latest version of Solaris?? dsantamassino Solaris / OpenSolaris 8 06-25-2003 02:48 PM
Latest version of FreeBSD glock19 Linux - General 8 02-02-2002 07:05 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration