LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   latest php version for RH9 ? (https://www.linuxquestions.org/questions/red-hat-31/latest-php-version-for-rh9-421725/)

vbsaltydog 03-04-2006 10:20 PM

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.

this213 03-04-2006 11:38 PM

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.

vbsaltydog 03-04-2006 11:56 PM

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.

sunil.us.ranjith 03-05-2006 12:59 AM

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

reddazz 03-05-2006 01:08 AM

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. :)

this213 03-05-2006 01:43 AM

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.

vbsaltydog 03-05-2006 06:54 PM

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.


All times are GMT -5. The time now is 05:33 PM.