I’m an amatuer looking for the path with least resistance…
A base install of PHP 5.16 bundled w/ CentOS 5 comes without GD support. For rebuilding PHP, would it be best to just upgrade to PHP 5.2 using the Interworx experimental RPM; the CentOS repo; or Kevin’s tutorial at Steadfast (I’m not their customer.)? I’m trying my best to K.I.S.S. by avoiding third-party RPMs. My only goal for now is to enable GD2 and Freetype with TTF support without creating a missing dependency mess. Necessary libraries for GD, GD2, Freetype 1 & 2 appear to be installed and ready to compile. Thanks to anybody for suggestions.
I’m also curious about ‘–without-mysql’ in my PHP info page when most other MySQL references are ‘–with’ or ‘enabled’.
The GD library is available as a module in yum, so you can just type “yum install php-gd” at the command line, restart apache (service httpd restart) and viola! - you have GD installed for PHP.
You weren’t kidding, that was easier than easy. We “every-other-Sunday hackers” have a tendency to over-complicate things. Interesting though-- I had earlier failures with ‘yum install php-gd’ so I guess installing gd dev librarires made the difference, which I don’t understand, but I won’t split that hair.
As for RPMs and repositories, is the Interworx experimental package the only supported one if I ever need to upgrade PHP beyond 5.16? I can think of only one script asking for 5.2 so it won’t be any time soon.
They’re technically unsupported, but as far as I know, they do work and should be fine as a drop in replacement for the default php 5.1.6 that comes with CentOS 5. These are built against MySQL 5.0.22, which is the MySQL version that CentOS installs automatically.
Well, CentOS won’t upgrade to this because they follow redhat’s releases, and redhat’s release policy is something along the lines of (paraphrasing)
“The software version that is released in an OS version will remain that version for the life of that OS version - however, critical and security updates in new releases of the software will be backported and patched against the official OS release version”.
So, in the case of PHP, CentOS 5 will always use PHP 5.1.6 as the “base” version, but they will provide updates to it that are deemed “critical” from newer php updates. That’s my understanding of the redhat policy anyway. What is critical and what isn’t, I’m not sure. But I understand why they do this, they have to talk a line of security and compatiblity in terms of updates.
Has anybody upgraded to php 5.2.6 using the experimental RPMs? I could use help on the best way to install the essential packages.
Will a yum.conf entry work for updating to php 5.2.6 with experimental RPMs? If so, will a simple yum update take care of it? I’m squeemish about using yum for an experimental update.
Or do I need to use rpm -i one-by-one in a specific order? Or will rpm --force install all dependent packages?
I count 17 individual packages for php 5.1.6 that are currently installed, but there are 24 RPMs in all. Although I reckon it’s a safe bet to replace just the existing 17 for now, does a standard iWorx installation normally use the entire lot? There are packages I don’t need like php-mssql and php-pgsqsl, plus there are numerous dependencies not found by yum (rhe5x & cos5x), even for basic packages like php-common. I’m trying really hard not to add repos from rpmforge, which is how I got around hard-to-find dependencies in the past.
I guess it doesn’t matter if we use -i or -U unless there’s a good reason to use -i. My main question was about how to install multiple RPMs in short hand. It’s now apparent I need to download them and install locally. Apparently, wildcards or the –allfiles switch won’t work unless the RPMs are local. An interesting switch for handling dependencies is –aid, but that only works with http or ftp. I realize I’m over-thinking it.
It’s fine to only update the php-* packages you already have installed, but you will have to update all of them that are currently installed. -U makes sense here, since you are in fact “updating” a package. You can download them locally and run the rpm -Uvh *.rpm, or you can specify them each remotely at the command line like
rpm -Uvh full-url-to-rpm1 full-url-to-rpm2
etc. You shouldn’t need to install anything extraneous from rpmforge etc to do this.
When I first tried installing php-5.2.6-rhe5x.iworx.js.100.i386.rpm it stopped because it depends on php-cli and php-common. I don’t mind installing one-by-one but when I tried installing cli and common (can’t remember which) there were missing dependencies yum was unable to find in a search. That’s what I’m getting at with using an outside repository. I worry that the regular yum repos won’t be able to help if I run into more missing dependencies.
I’ll just jump in the water with all existing pkgs and see what happens. Meanwhile there’s a riddle: Of the 17 installed packages for php 5.1.6, one of them is php-iworx-4.3.9-7.rhe5x.iworx which leaves 16 packages to upgrade to 5.2.6. Should I first uninstall the version 4 package? I started out with CenOS 5 so I don’t understand why it’s there in the first place unless it’s for backward compatibility.
Thanks Paul!
edit: The upgrade was successful. My mistake was listing php-mcrypt in the list of “existing” packages which there are no yum matches for dependencies. In all 15 pkgs installed with no resistance at all. Thanks again.