Upgrade PHP

29 posts / 0 new
Last post
#1 Tue, 03/11/2008 - 11:14
izoox

Upgrade PHP

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.

Tue, 03/11/2008 - 17:12
Joe
Joe's picture

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.

--

Check out the forum guidelines!

Wed, 03/12/2008 - 07:56 (Reply to #2)
izoox

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]

Can you tell if this will mess stuff up?

Wed, 03/12/2008 - 09:17 (Reply to #3)
izoox

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.

Sun, 02/08/2009 - 21:15 (Reply to #4)
paulfromsurrey

i am trying to update the php from 5.16 to 5.23

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

Sun, 02/08/2009 - 21:59 (Reply to #5)
paulfromsurrey

i came across this post

http://www.jasonlitka.com/yum-repository/

when i followed the steps

yum does see 13 packages

So i like to confirm this is safe to update as these filesa re from jason utteramblings

please jimmy or Joe give me green light

Thanks
Paul

Mon, 02/09/2009 - 05:04 (Reply to #6)
andreychek

Hi Paul,

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

http://www.virtualmin.com/documentation/id,virtualmin_bleeding_edge_pack...

That contains PHP 5.2.6 (which Joe promised he'll be upgrading to a newer version real soon now).

Again, it's no where near as well tested as the distro-supplied packages, but it should do in a pinch :-)
-Eric

Tue, 02/10/2009 - 22:12 (Reply to #7)
paulfromsurrey

I guess may be this is stupid question

how i can use this to update my software

when i click the link it opens up alot of files

please advise

Thanks
Paul

Tue, 02/10/2009 - 23:04 (Reply to #8)
Joe
Joe's picture

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

--

Check out the forum guidelines!

Sat, 02/14/2009 - 19:40 (Reply to #9)
paulfromsurrey

can some one explain to me step by step Virtualmin bleeding edge repository

Thu, 03/05/2009 - 06:52 (Reply to #10)
rduval

Me too! Is there an easy way to do this joe?

Thu, 03/05/2009 - 07:10 (Reply to #11)
andreychek

I'm not sure that Joe's had a chance to update the repodata for that repository, meaning that yum won't fully work with it.

In the meantime, you can manually download packages, they just won't auto-update until there repo metadata is all up to date.

Just remember, that's why this repository is considered "unsupported" :-)

The repository is available here:

http://www.virtualmin.com/documentation/id,virtualmin_bleeding_edge_pack...

Thu, 03/05/2009 - 10:29 (Reply to #12)
Joe
Joe's picture

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.

--

Check out the forum guidelines!

Thu, 03/05/2009 - 10:31 (Reply to #13)
Joe
Joe's picture

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.

--

Check out the forum guidelines!

Tue, 03/11/2008 - 21:16
izoox

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?

Tue, 03/11/2008 - 23:28 (Reply to #15)
Joe
Joe's picture

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.

--

Check out the forum guidelines!

Sat, 04/04/2009 - 13:26
katir

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?

Sat, 04/04/2009 - 16:03 (Reply to #17)
andreychek

I haven't heard about any problems using PHP 5.2 along with the apps available in the Script Installers.

Do you need 5.2? Only if you find yourself trying to install apps that require it :-)
-Eric

Sat, 04/04/2009 - 17:54 (Reply to #18)
Joe
Joe's picture

<div class='quote'>but the call to the respository seemed to fail</div>

&quot;seemed to fail&quot; isn't much to go on for helping you diagnose the problem. ;-)

--

Check out the forum guidelines!

Sat, 04/04/2009 - 18:38 (Reply to #19)
katir

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

Sat, 04/04/2009 - 19:29 (Reply to #20)
Joe
Joe's picture

I'm pretty sure that Drupal 6 runs fine under PHP 5.1.x. I even tested it some for a while on our new website. There <i>are</i> a couple of pretty popular modules that do require 5.2.x, though. But, I'd probably check to be sure you need it before making the switch. (Though I doubt there will be any compatibility problems going forward.)

--

Check out the forum guidelines!

Sat, 04/04/2009 - 19:38
katir

right, it was the Drupal installation FAQ that recommended the upgrade of PHP... the issue is: will it break other apps on the server? XOOPS and Zencart in particular... I'm checking on those sites.

Mon, 04/06/2009 - 13:21 (Reply to #22)
katir

Our ecommerce site admin is traveling and PHP 5.2.9 will break ZenCart until we upgrade ZenCart first (sessions algorithms have changed) so I have to wait til he gets home later this month and we upgrade ZenCart.

Meanwhile we are running all the PHP extensions listed by Drupal's FAQ except this one:

with-pxs2

Does anyone know what this one does and how to install it? Can we install PHP extensions like this from inside VirtualMin? If it is automatic on upgrade to PHP 5.2.9 then I will wait. But, I'm a PHP infant and I'd just like to understand it.. www.php.net manual wasn't very helpful. and a Google search for pxs2 doesn't get me anything but more unclarity. I assume it's some kind of lib that is called on install and compiled in with the rest... Do we need to install that lib before we upgrade to 5.2.9? Where? in the /use/include/php/ext/ (I don't see any lib that matches &quot;pxs2&quot; in there now...) Or can we just drop the lib in a directory, add a line in the php init/config and restart apache?

If this is not the place to hold out begging bowls for PHP mentoring or edu then fire away and tell me where to go :-)

(a url would help since I can't find it on PHP.net)

Mon, 04/06/2009 - 19:28 (Reply to #23)
andreychek

Is it possible it was &quot;apxs2&quot; rather than just &quot;pxs2&quot;?

The apxs2 option is what is needed to compile PHP as an Apache module, which I believe is essentially &quot;mod_php&quot;.

That said -- I do not believe Drupal as a whole requires mod_php, so I'm not sure what to make of all that :-)
-Eric

Tue, 04/07/2009 - 11:54 (Reply to #24)
Joe
Joe's picture

There is no --with-pxs2 option. As Eric mentioned, there is --with-apxs2, and it is compiled into every version of PHP you'll get with any modern Linux distro (on very old distros you might get --with-axps, instead, which is for Apache 1.x).

I don't think you need to worry over apxs2, at all.

--

Check out the forum guidelines!

Tue, 04/07/2009 - 12:29 (Reply to #25)
katir

OK I;m happy to let it go, but the developers of the new site on our server who are not so savvy will ask &quot;what are we to make then of Acquia Drupals recommendation to have

with-pxs2? on the system?

see

http://acquia.com/node/276984 is the recommendation &quot;bogus&quot;

php.info does not list &quot;with-apxs2&quot; and the server API is set to Fast CGI.

Meanwhile, I'll tell them not to worry about it, that it is &quot;compiled&quot; into it on installation and as such does not need to be called from an external lib... right?

Thu, 04/16/2009 - 12:49 (Reply to #26)
Joe
Joe's picture

<div class='quote'>http://acquia.com/node/276984 is the recommendation &quot;bogus&quot;</div>

It's a typo. Then again, they also recommend with-pgsql, which <i>nobody</i> uses for Drupal (though Drupal will mostly run on PostgreSQL in recent versions). So, bogus is seeming more likely by the minute.

Drupal runs just fine under mod_fcgid or mod_php. I don't what to tell you. If your developers can't look at a Drupal site running fine on the system, and understand that it is working fine, I don't think your or I can fix that. ;-)

--

Check out the forum guidelines!

Thu, 04/16/2009 - 05:31
Taler

There were three posts on the second page begging for documentation on how to use the repository. Can somebody please answer?

Thanks!

Thu, 04/16/2009 - 05:42 (Reply to #28)
andreychek

Howdy,

Everything you should need in order to use it should be here:

http://www.virtualmin.com/documentation/id,virtualmin_bleeding_edge_pack...

That includes an explanation of what it is, who should use it, as well as how to setup the repository :-)

Once you've followed the instructions in the above docs (of note, be sure to install the virtualmin-bleed-release package), updating to the version of PHP in that repo should just be a matter of running a &quot;yum update&quot;.
-Eric

Topic locked