I was wondering what the best way to upgrade PHP to a version greater than 5.2.0 on Debian 4 would be. PHP 5.2.0 has issues, that are resolved in later versions. I prefer 5.2.3, but I don’t want to do anything that will mess up Virtualmin or future updates to Virtualmin. I thought of doing this:
…Temporarily changing the apt source to lenny, and manually installing the new version of php5. I ran this but canceled it, just to see what it would change and it didn’t look like it was changing anything Virtualmin, but it did update quite a few packages. Obviously then, after the update, changing the apt source back to etch…
Does anyone know if this will cause serious issues, or maybe know of a better way of upgrading PHP. I would prefer not to compile from source so I can continue to use apt for updates.
Someone mentioned the volatile debian repo here in the forums a few days ago for Clam and SpamAssassin. I dunno if it chases PHP, as well, but it might be worth looking into as an alternative to pulling in lenny packages (since that might trigger a dependency chain that gets ugly, I dunno).
Virtualmin doesn’t care…but if apache2 ends up being replaced, you’ll need to build a custom package so you have suexec_docroot set correctly.
If I built a test box on Debian and installed the GPL version and tried to upgrade it using the lenny repositories, since the volatile reps don’t include php would it be a good indicator if it worked on the GPL system that it was going to work on the Pro version?
Well, GPL doesn’t do much in the way of PHP version handling…but Virtualmin doesn’t care about PHP versions beyond detecting a php4 and php5. The question is: Do php applications work? Do they work under mod_fcgid? Do they work under suexec? If all of these are true, then you’ll be fine.
Well, this is what it returns when I run the install for php5:
[code:1]:/home/admin# apt-get install php5
Reading package lists… Done
Building dependency tree… Done
The following extra packages will be installed:
libapache2-mod-php5 libc6 libc6-i686 libdb4.6 libkeyutils1 libkrb53 libpcre3
libssl0.9.8 libxml2 locales mysql-common php5-cgi php5-common php5-mcrypt
php5-mhash php5-mysql php5-odbc php5-pspell php5-tidy tzdata zlib1g
Suggested packages:
php5-timezonedb glibc-doc krb5-doc krb5-user
Recommended packages:
xml-core
The following packages will be REMOVED:
libc6-dev libmysqlclient15-dev php5-cli php5-curl php5-gd php5-imap
php5-json php5-ldap php5-pgsql php5-sqlite zlib1g-dev
The following NEW packages will be installed:
libdb4.6 libkeyutils1
The following packages will be upgraded:
libapache2-mod-php5 libc6 libc6-i686 libkrb53 libpcre3 libssl0.9.8 libxml2
locales mysql-common php5 php5-cgi php5-common php5-mcrypt php5-mhash
php5-mysql php5-odbc php5-pspell php5-tidy tzdata zlib1g
20 upgraded, 2 newly installed, 11 to remove and 316 not upgraded.
Need to get 24.0MB of archives.
After unpacking 33.4MB disk space will be freed.
Do you want to continue [Y/n]?[/code:1]
I just ran the php5 lenny update, but I ran it from the Virtualmin package upgrades, and I only checked php5 and php5-cli, and it upgraded everything perfectly. I have reset the apt source to etch and all is well. Just wanted you to know for future reference.
i have 2 website needs latest php files if some one can help me will be great
when I use command yum update php or yum update php5
nothing happnen
I also have question regarding php ini
one of the website wants me to turn register global on but if i turn that feature in php ini will effect whole server.
i was reading a found some one that i can just copy the php file and upload to the root folder with global register on. by doing this only this website will be effected not all server
any advise
i do not like to make any stupid mistake so please let me know best way to uupdate php
Well, by far the first choice is to use a distro’s PHP packages. Alas, some web apps are requiring a PHP version not available to RHEL/CentOS – so yeah, at that point, you’re stuck needing to upgrade
There aren’t really any third party repository’s that we can officially support. There does happen to be a Virtualmin bleeding edge repository though, and while that’s not officially supported either, it is known to work
If you can wait a day or so, I’ll be adding a release package, that’ll setup a yum repo configuration file for you automatically. If not, you’ll need to create a yum repository configuration file manually (or download and install all the individual packages you want and install them using the rpm command).
I thought I had repodata updating along with all other repos, so it should always be up to date with the packages in the repo (which are at 5.2.8 now, I believe)…but I’ll double check it.
Oh, I wrote a separate script for updating the bleeding edge repo. It actually wasn’t being run during the rsync from my desktop machine where I build all this stuff. I’ve corrected it and kicked off an update the repo meta data just now.
I’ve read thru everything I could see on PHP upgrades. I note the bleeding edge repository post by Joe. We too are interested in the latest Drupal that recommends PHP 5.2.9. We even tried to install it from the bleeding edge package index but the call to the respository seemed to fail…
Setting that aside for the moment, assuming we can install it, does anyone know if it has problems with XOOPS or Zen Cart (this is probably the wrong place to ask this question… but I just wanted to post here first)
We are running CentOS 5 at this point… do we need 5.2?
right, sorry about that… I wasn’t the one doing it but will be the next time… I have to find out first if 5.2.9 will break XOOPS or Zencart… after we make that determination I’ll try the install again from the repository…