PDA

View Full Version : HOW TO: Install PHP 5.2 through yum


IWorx-Jon
04-08-2010, 09:33 AM
As many of you know, the version of PHP that ships with CentOS 5 is very outdated. One question we are constantly asked is "How can I install PHP 5.2 on my InterWorx server?". Wouldn't it be a lot easier if you could just add them to yum? Of course it is, so here's how to do it. ;)

Please note these RPMs are Unsupported. We will try our best to make sure that nothing breaks, but using these RPMs is at your own risk.

1.) Create a file called iworx-unsupported.repo in /etc/yum.repos.d/
[root@host ~]$ emacs /etc/yum.repos.d/iworx-unsupported.repo 2.) Enter the following, replacing cos5x with rhe5x if using RHEL 5 or rhe4x if using RHEL 4, centOS 4 users may be out of luck.
[iworx-unsupported]
name=IWorx Unsupported
baseurl=http://updates.interworx.com/iworx/RPMS/unsupported/php5/cos5x/$basearch/
gpgcheck=03.) Now run yum update.

[root@host ~]$ yum update4.) You should be greeted with the following text.

================================================== ================================================
Package Arch Version Repository Size
================================================== ================================================
Updating:
php i386 5.2.12-rhe5x.iworx.js.100 unsupported-php 3.7 M
php-cli i386 5.2.12-rhe5x.iworx.js.100 unsupported-php 2.7 M
php-common i386 5.2.12-rhe5x.iworx.js.100 unsupported-php 505 k
php-devel i386 5.2.12-rhe5x.iworx.js.100 unsupported-php 567 k
php-ldap i386 5.2.12-rhe5x.iworx.js.100 unsupported-php 57 k
php-mysql i386 5.2.12-rhe5x.iworx.js.100 unsupported-php 258 k
php-pdo i386 5.2.12-rhe5x.iworx.js.100 unsupported-php 157 k

Transaction Summary
================================================== ================================================
Install 0 Package(s)
Update 7 Package(s)
Remove 0 Package(s)

Total download size: 7.8 M
Is this ok [y/N]:

john2k
04-09-2010, 10:38 AM
Thanks for posting this. Perfect timing as I'm just getting started to upgrade my forums to vBulletin 4, which requires PHP 5.2+.

If by some chance upgrading to PHP 5.2 does cause problems with scripts or whatever, what would be the process to revert back to the previous default supported version of PHP? Or rather, how would we undo this change if necessary?

IWorx-Jon
04-09-2010, 11:45 AM
To revert the PHP update to the base version installed by CentOS, you just need to run the following command. Note: You may need to specify additional packages if you installed any other php extensions not listed here.

yum downgrade php php-cli php-common php-devel php-ldap php-mysql php-pdo

IWorx-Tim-Pgh
04-12-2010, 07:52 AM
AND - remove the new repo, cause otherwise the upgrade will just happen the next time someone runs "yum upgrade" :)

SoccerGuy3
09-01-2010, 05:24 PM
Tried these instructions today and it isn't working. The one thing I see is this error:

--> Finished Dependency Resolution
5:php-pear-5.2.9-100.rhe5x.iworx.steadfast.i386 from installed has depsolving problems
--> Missing Dependency: php = 5.2.9-100.rhe5x.iworx.steadfast is needed by package 5:php-pear-5.2.9-100.rhe5x.iworx.steadfast.i386 (installed)
Error: Missing Dependency: php = 5.2.9-100.rhe5x.iworx.steadfast is needed by package 5:php-pear-5.2.9-100.rhe5x.iworx.steadfast.i386 (installed)

Not sure what this is or how to fix it. Suggestions?

IWorx-Dan
09-01-2010, 05:49 PM
We would need more information to determine what is wrong. If you bought your license through us you can open a support ticket and we can take a look.

Justec
01-27-2011, 11:29 AM
I upgraded my CentOS 5.5 to PHP 5.2 using this method and worked well. Only hiccup I ran into was I got a warning in NodeWorx on the web server page:
"Warning, mod_php and mod_suphp are both enabled, this is a security risk!"

I just restarted apache and then the warning was gone and everything seems fine running on suPHP.

Gimly
02-10-2011, 04:13 PM
I-ve seen an update in iworx repository for php 5.2.17. I made an YUM UPDATE, but I've dependencies error with php5.2.14 iworx :

yum update
Excluding Packages from Les RPM de remi pour Enterprise Linux 5 - i386
Finished
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package php.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
---> Package php-cli.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
--> Processing Dependency: php-common = 5.2.14-1.w5 for package: php-pspell
---> Package php-common.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
---> Package php-devel.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
---> Package php-gd.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
---> Package php-imap.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
---> Package php-mbstring.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
---> Package php-mcrypt.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
---> Package php-mhash.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
---> Package php-mysql.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
---> Package php-odbc.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
---> Package php-pdo.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
---> Package php-soap.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
---> Package php-xml.i386 0:5.2.17-rhe5x.iworx.js.suhosin.fpm.200 set to be updated
--> Finished Dependency Resolution
php-pspell-5.2.14-1.w5.i386 from installed has depsolving problems
--> Missing Dependency: php-common = 5.2.14-1.w5 is needed by package php-pspell-5.2.14-1.w5.i386 (installed)
Error: Missing Dependency: php-common = 5.2.14-1.w5 is needed by package php-pspell-5.2.14-1.w5.i386 (installed)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.

If you have an idea ?

Thank you :)

netipro
02-24-2011, 02:11 PM
It looks like you have differents source installation of php..
You have php-pspell that ask for php-common 5.2.14.w5 which isn't here as you have updated it as php-common-iworx...


I'd uninstall all no interworx php, then install them from the iworx repo (unsuported). Or at least uninstall no need php rpm (pspell is it really needed ?)

Also, Some cmd as rpm -qa | grep php / or yum list php* should help.

If you need special feature not provided, the best way may be to update the src.rpm provided by interworx here http://updates.interworx.com/iworx/RPMS/unsupported/php5/cos5x/ (5.2.17 & 5.3.3)

Mehmet Ali
02-25-2011, 09:56 AM
I-ve seen an update in iworx repository for php 5.2.17. I made an YUM UPDATE, but I've dependencies error with php5.2.14 iworx :
If you have an idea ?
Thank you :)

You can use this command

yum update php php-cli php-common php-devel php-ldap php-mysql php-pdo

sysnop
06-14-2011, 06:40 AM
AND - remove the new repo, cause otherwise the upgrade will just happen the next time someone runs "yum upgrade" :)
For folks who installed using the experimental repo, what is best practice for regular scheduled updates? Turn them off and continue updating with the experimental repo? If so, is there a way to schedule OS updates only?

Thanks.

IWorx-Dan
06-16-2011, 04:30 PM
For folks who installed using the experimental repo, what is best practice for regular scheduled updates? Turn them off and continue updating with the experimental repo? If so, is there a way to schedule OS updates only?

Thanks.

What do you mean by "experimental repo" - the iworx unsupported repo? Or another 3rd party repo like atomic or remi?

sysnop
06-16-2011, 07:39 PM
I mean the unsupported iworx repo. Thought I saw it referred to as "experimental" somewhere in the forums but I can see how the iworx team might not care for that reference.

IWorx-Dan
06-16-2011, 10:10 PM
Oh I guess it can be called experimental - you really shouldn't have to worry about changing anything re: automatic updates unless you are using another 3rd party repository. Since CentOS/RHEL are running older versions of PHP they won't ever overwrite the unsupported iworx PHP.

allwebnow
09-09-2011, 09:11 AM
I always thought hosting control panels were capable of controlling what version of php was run on the server via the interface. many popular php scripts (mainly the latest version of wordpress) are unable to be installed on 5.1 anymore. Considering php 5.3 has been out for 2 years now, Is interworx planning on providing php5.2 out of the box and supported in the near future?

zombie process
09-09-2011, 12:16 PM
RHEL/centos 6 ship with PHP 5.3. Updating to 5.2 by adding the iworx repo is extremely easy on RHEL/centos 5.

allwebnow
09-09-2011, 12:22 PM
Yeah, I upgraded using the info here and it took me about 1minute to do it maybe less. But many newbies that are starting a hosting company that want to use interworx aren't going to know how to do this via command prompt and are going to be scared to do something like this for something so standard as php 5.2. I heard from iworx support they might be supporting newer php versions in future releases.

zombie process
09-09-2011, 03:04 PM
That's good to hear. I admit that I think that it's a bit of a cop out to hear "talk to your distro about upgrading packages" when they only support red hat and respins. I personally have no issues with red hat, but they aren't known for having the most recent versions of packages, centos less so. Trying to get ruby up to date enough to support rails in a fashion that iworx would see on centos 5.6 was frustrating, so I do absolutely see your point.

All that said, I have absolutely no sympathy at all for anyone wanting to run a hosting biz without enough clue to add a managed repo and run an update from the CLI.