Should I upgrade PHP to 5.4

Started by Opentoe, February 14, 2013, 03:52:50 AM

Previous topic - Next topic

Opentoe

I'm using PHP 5.3 with no problems. Is there a benefit to upgrade my WHM to PHP 5.4.1?



Also does anyone know of a good site monitoring service that is free? Right now I'm using hyperspin and it has been just fine, but wondered if there were better ones out there that I'm missing out on.

Have a good one.


Suki

it is if you are planning on using some of the features that are new in 5.4 (fancy arrays, traits, the build in web server but thats just for local testing mostly), SMF doesn't use any of those so there is really no benefit from the SMF point of view.

If you are using some other scripts that do benefit from the upgrade then yes, SMF 2.0 will still play nice on it.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

butch2k

Beware of the pass by reference issue, as some mods are wrongly coded and they cause fatal errors in PHP 5.4.

some background and fixes to this issue in case you encounter it:
http://stackoverflow.com/questions/8971261/php-5-4-call-time-pass-by-reference-easy-fix-available


Opentoe

Quote from: Suki on February 14, 2013, 08:59:43 AM
it is if you are planning on using some of the features that are new in 5.4 (fancy arrays, traits, the build in web server but thats just for local testing mostly), SMF doesn't use any of those so there is really no benefit from the SMF point of view.

If you are using some other scripts that do benefit from the upgrade then yes, SMF 2.0 will still play nice on it.

I wish I could upgrade PHP for just one domain on my WHM account. Or better yet, create a VM in my VM! :)

Suki

you got me there as I know absolutely nothing about servers.

I thought you were talking about php differences in an SMF context which, apart form the issue butch2k mentions and some not so well coded mods floating around here, there shouldn't be any difference in running SMF in 5.3 or 5.4
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

butch2k

You can try compiling PHP 5.4 with the following options:
--prefix=/opt/php-5.4 \
--with-config-file-path=/opt/php-5.4/etc/php5/fpm \
--with-config-file-scan-dir=/opt/php-5.4/etc/php5/fpm/conf.d

it will install PHP 5.4 in parallel with 5.3

LiroyvH

Quote
I wish I could upgrade PHP for just one domain on my WHM account. Or better yet, create a VM in my VM!

If it's not fancy croot "OpenVZ" virtualization but something like KVM or XEN: that's actually possible if you know what you're doing.
Not that I would actually recommend doing that though. :X
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

Joshua Dickerson

If all you want to do is play with PHP 5.4 download it to a local VM (see VirtualBox for instance) and use that. If you are wondering if you'll see any difference otherwise, nope. I doubt very much that 5.4 will give you any improvements at this time.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

butch2k

AFAIR there was a small performance improvement when i went from 5.3 to 5.4, but nothing significant.
I got more performance going from APC to APCu/Opcache+ combo, the new opcache integrated into 5.5 is performing much better than APC (at least for me).

ziycon

Quote from: butch2k on February 14, 2013, 09:34:08 AM
Beware of the pass by reference issue, as some mods are wrongly coded and they cause fatal errors in PHP 5.4.

some background and fixes to this issue in case you encounter it:
http://stackoverflow.com/questions/8971261/php-5-4-call-time-pass-by-reference-easy-fix-available


Very handy to be aware of, hadn't come across this issue just yet myself, even after upgrading 3 servers last week. Thanks for the info!

butch2k

You can encounter it with some SMF mods and other webapps (Some versions of Dokuwiki for instance).

Advertisement: