New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Any reason why I should not upgrade PHP from 5.6.xx to 7?
Sorry, asking lots of questions thees days, but I have some spare time and use it on my web servers.
I'm using CentOS 6.8 64bit and Virtualmin on all my servers. Today I'm using PHP 5.6.29. Is there any reason why I should not upgrade all my servers to PHP 7?
I'm using WordPress on all my sites, hardly any plugins.
What PHP version are you using, and why?
Comments
I think it's worth it. https://www.google.com/search?q=php5+php7+wordpress
https://www.cloudways.com/blog/wordpress-on-php-7-performance-benchmarks-upgrade-guide/
Php 7 performance is better, thats it.
PHP 5.6 is definitely faster then older versions. If your script is compatible with PHP 5.6 stay with it. You can move to PHP 7 only if you don't face any incompatibility issues.
Support between 5.6 and 7.0 is about the same. Upgrade only if you want things faster, but first make sure you do not face compatibility problems.
http://php.net/supported-versions.php
So there is no security upside to upgrading? Just speed? My sites is small and I doubt that I will see any real speed upgrade.
I get this error on one of my site, when I restore my sites from Virtualmin backup on a new server with PHP 7:
Re-loading MySQL database xxxxxxx .. load failed! ERROR 1273 (HY000) at line 25: Unknown collation: 'utf8mb4_unicode_ci'
So clearly there are some issues with upgrading my sites. Maybe I will try first restoring my sites on PHP 5, then upgrade to PHP 7...but this can cause trouble right?
Before upgrade check compatibility
https://github.com/sstalle/php7cc
Are servers MySQL configuration and versions identical?
Restoring my sites on PHP 5.6.x, then upgrading to 7, couses issue on only one of my sites. If I change theme all is OK with that site also.
But my backups will not restore on a fresh PHP 7 server.
Maybe if I take backup of my test server with now the upgraded PHP 7, then try to restore it back on a fresh PHP 7 server...what do you think?
I'm using the php version with native Unicode support.
more like subparglobals am i rite, @bsdguy?
@myhken, the biggest caveat on older core PHP websites would be if they connect/transact to mysql using the depricated mysql_xxx commands, it doesn't work in PHP7 as they have been completely removed now. You will need to convert them to mysqli which can be a daunting task for older code blocks.
ref:
https://ckon.wordpress.com/2015/08/06/put-mysql-functions-back-into-php-7/
http://serverfault.com/questions/752368/php-7-cannot-connect-to-mysql
@WSS Dunno, have very limited phpexperience. But it seems to me that the above error message means roughly "Why didn't you use professional tools?".
More seriously, I guess that some things have been changed in the setup of either mysql (or one of its many derivates) or php and now there is a hiccup in the utf8-wide wide string mechanism. Whatever, me not know php crap and hence didn't comment.
And: Of course you are - automagically - right. You look like a rocket scientist and we all know that rocket scientists are always right.
That's a MySQL error, fwiw. I also are brain scientist. Done work on self. Feel OK now.
@WSS
No bad words against mysql! One of the best database simulators out there! Looks and feels like a real database. Very useful for testing and, of course, entertaining. See above example.
our sites got much faster and also felt more secure maybe a feeling... ut my .02 cents
There are any addons could not run with Php7
You need to check your website carefully and make sure that it will be compatible with php7 before applying it to your servers.
Here's any changes in PHP7 over php5xx
http://php.net/manual/en/migration70.new-features.php
http://forumweb.hosting/14316-changes-in-php-7-1.html
https://www.digitalocean.com/company/blog/getting-ready-for-php-7/
Hope that helps.