When will it be safe to install PHP 5.4?

We're using Ubuntu 10.04 LTS, and currently have the official packages (PHP 5.3.2). However, we are planning to start using some 5.4's features very soon.

When do you think it will be "safe enough" to install it in our VPS? If it already is, how could I install 5.4 in 10.04? Adding this PPA would be secure? https://launchpad.net/~ondrej/+archive/php5

Thanks!

22 Replies

@celtric:

We're using Ubuntu 10.04 LTS, and currently have the official packages (PHP 5.3.2). However, we are planning to start using some 5.4's features very soon.

When do you think it will be "safe enough" to install it in our VPS? If it already is, how could I install 5.4 in 10.04? Adding this PPA would be secure? https://launchpad.net/~ondrej/+archive/php5

Thanks!

Would you be better off just waiting a month and upgrading to 12.04 LTS?

I say go for it. Life is short so why dilly dally.

We need more ground breakers like yourself, jumping in when the "new code smell" is still fresh.

That way in about 6 months or so when all the sane people start to think about upgrading, early adopters (nay, heroes) like yourself will have already endured months of buggy code and huge numbers of incompatibilities just so that my eventual migration will go smoothly.

So cheers to you - thank you for making my life much much easier.

Oh, and don't forget about Apache 2.4 (that whole argument of "too many variables" is just for old farts and sissies).

@glg:

Would you be better off just waiting a month and upgrading to 12.04 LTS?

I think it will ship with PHP 5.3.10, so not worth waiting I'm afraid (but we do plan to upgrade to 12.04 once it becomes available).

@celtric:

I think it will ship with PHP 5.3.10, so not worth waiting I'm afraid (but we do plan to upgrade to 12.04 once it becomes available).

ah, you are correct on that.

@celtric:

https://launchpad.net/~ondrej/+archive/php5
That PPA seems to be pretty well-maintained, but you should check it periodically to make sure it's getting all security fixes in a timely manner. A lot of PPAs fizzle out after a while, leaving their users with outdated and insecure software. Ubuntu official packages, on the other hand, are guaranteed to be maintained by Canonical, Inc.

To be honest, the short array syntax alone would be enough to get me to upgrade. This was proposed many years ago but repeatedly rejected for dubious reasons. It seems that some sanity has finally returned to the PHP devs.

The short array syntax seems to basically just save you five keystrokes when initializing an array with values, basically allowing you to type "[" instead of "array(", something that a search and replace regex could do trivially… Handy, sure, but hardly justification alone for an upgrade.

@Guspaz:

The short array syntax seems to basically just save you five keystrokes six, you need the shift key for the left parenthesis, but not for the left square bracket. :P

Technically seven, then, for the right paren, but that's not my point. My point is that the feature adds nothing functional, it's a timesaving thing that can also be achieved by a simple regex, it's not a reason to upgrade.

@Guspaz:

Technically seven, then, for the right paren, but that's not my point. My point is that the feature adds nothing functional, it's a timesaving thing that can also be achieved by a simple regex, it's not a reason to upgrade.

True, seven indeed.

As for the regex… I'm assuming you are talking about using a regex to convert the new syntax into the old syntax. You're correct that it alone is not enough reason to switch over to php5.4, however I'm far less certain that the regex would be simple… at least not to come up with, perhaps in it's final form.

@Gerry:

True, seven indeed.

As for the regex… I'm assuming you are talking about using a regex to convert the new syntax into the old syntax. You're correct that it alone is not enough reason to switch over to php5.4, however I'm far less certain that the regex would be simple… at least not to come up with, perhaps in it's final form.

Perhaps, but my point is that it doesn't change anything. It's akin to saying "I must upgrade to PHP 5.4 because they renamed filegetcontents() to file_get(), a feature that I can't live without".

Also note that code written using the new syntax will not work with older versions, and it will likely be many years before this isn't a Problem. PHP 5.2 is still out there, in production…

@hoopycat:

Also note that code written using the new syntax will not work with older versions, and it will likely be many years before this isn't a Problem. PHP 5.2 is still out there, in production…

It would actually be simpler if it was just a function name change. Then something like php_compat (which backports PHP features from newer versions to older versions, allowing you to run software that requires newer PHP versions on older installs) could trivially support it. I don't think that can work for syntax features like this.

@hoopycat:

Also note that code written using the new syntax will not work with older versions, and it will likely be many years before this isn't a Problem. PHP 5.2 is still out there, in production…
I've lent someone a simple script recently, that was using a function added in 5.0. It didn't work on that guy's server (at a big famous US university that's quite involved in tech stuff).

Turned out the webserver he had webspace assigned on was an ancient Solaris box with PHP that was 4.3.something, or even 4.2.x. (but definitely 4.x).

@rsk:

It didn't work on that guy's server (at a big famous US university that's quite involved in tech stuff).

Turned out the webserver he had webspace assigned on was an ancient Solaris box with PHP that was 4.3.something, or even 4.2.x. (but definitely 4.x).

I work for a big public university and I have sites I maintain on a RHEL (not sure of the version) box that is running php 4.3.9.

php_compat may be useful, then.

@bjl:

I work for a big public university and I have sites I maintain on a RHEL (not sure of the version) box that is running php 4.3.9. http://developers.slashdot.org/story/07 … nouncement">http://developers.slashdot.org/story/07/07/14/0646216/php-4-end-of-life-announcement

edit: Thanks to rsk for pointing out that I quoted the wrong person.

I'm guessing it is most likely RHEL 4, which just went EOL last week. That "extended" EOL support contract is probably pretty expensive…

Ondřej Surý is an official maintainer of the Debian package (http://packages.debian.org/sid/php5) so if ya can't trust his ppa then whose can ya trust? :D

@Gerry:

@rsk:

I work for a big public university and I have sites I maintain on a RHEL (not sure of the version) box that is running php 4.3.9. http://developers.slashdot.org/story/07 … nouncement">http://developers.slashdot.org/story/07/07/14/0646216/php-4-end-of-life-announcement
I didn't write that.

Maybe you just forgot that you work for a big Uni.

@rsk:

@Gerry:

@rsk:

I work for a big public university and I have sites I maintain on a RHEL (not sure of the version) box that is running php 4.3.9. http://developers.slashdot.org/story/07 … nouncement">http://developers.slashdot.org/story/07/07/14/0646216/php-4-end-of-life-announcement
I didn't write that.

I did. I think Gerry got confused with the three letter usernames. :)

I have plans to move the site to a new server, but it hasn't been a priority and the admin hasn't pushed for it. I do it when I have to and we're really not using PHP for that site anyway. Don't know about the other sites hosted on the same server though.

@rsk:

@Gerry:

@rsk:

I work for a big public university and I have sites I maintain on a RHEL (not sure of the version) box that is running php 4.3.9. http://developers.slashdot.org/story/07 … nouncement">http://developers.slashdot.org/story/07/07/14/0646216/php-4-end-of-life-announcement
I didn't write that.

Wow, how on earth did that happen… Fixed now, thanks and sorry.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct