arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Beware! PHP 8 may break old WP Themes!
#7
(05-08-2021, 05:25 AM)Littlemaster Wrote: I have seen some projects were abandoned during the pHp 7 upgrade. The major thing was it removed mysql_real_escape_string. It was required as sql injection was at its peak. Those who upgraded their source code has not lost in the game. Coming to PHP 8 I see the rules are more strict, mcrypt has deprecated. Also even the variable code required to be in proper syntax. I mean in php7 it was accepted that we can print variable like $result[id] but in php 8 we must use $result['id']. Even such small things are being concentrated to ensure the code is in a good manner. I see the upgrades are for the best rather than a burden. It gives much better experience if we can upgrade the projects.

What was interesting to me is that I was transferring four WP sites from one VPS to another.  Three had no issues, and they had default twenty thirteen WP themes on it that I updated with a child theme.  So looks like Wordpress themes are OK.  

For me looks like old themes that owners of the themes are no longer interested in, and have forgotten about, but are still popular any way, are going to be a real problem.  I have a few other Website backups that I "archived" a while ago, that are basically extinct now.  

(05-08-2021, 03:00 AM)mzltest Wrote: And it breaks applications too.I installed PHP 8.0 on my vps and when I wanted to install SMF 2.1 it breaks installation by numerous warnings.So I have to install another version of PHP for it.

It seems some expressions are no longer supported that might cause the themes stopped to work - as I noticed that array indexs described by {} is no longer supported and throws error while in PHP 7.3(at my local testing) it does not throw an error at least.

Well,unless the theme and application explicitly says support for PHP 8.x otherwise 7.3 is still fine.

Thanks for the feedback @mzltest.  I've got a few  hosting accounts, including shared hosting accounts.  There is one I value very much for always being up to date - Limitless Hosting - and not only does it have php 7.3 as the recommended php, but there are several versions to choose from in its panel.  Coincidentally, last night when I created a new Website with CyberPanel (a user account with @fitkoh) running on his VPSs from RackNerd, when you create the Website it gives you a selection of VPS 7 versions to choose from. Courtesy of CyberPanel.
(05-08-2021, 03:00 AM)mzltest Wrote: ---Offtopic:
Actually a little more annoying thing for me is the application uses apache(.htaccess for link shortening) but your server is nginx when you dont know how to properly conf it.
Aha.  Now that must be the reason for the problem in the first instance.  Nginx.  And yes, there were a Tower of Babel number of suggestions out there how to conf it.  I tried, but obviously was doing it in the dark - I didn't really know or understand what I was doing.  There was the var/www/httpd .htaccess suggestions and then the public folder .htaccess.  In the end I thought I may create a security issue when I didn't know exactly what the consequences were going to be. As Admin at Gigarocket we always discouraged members from using .htaccess as it's not that secure to Override "All" functions. Silver lining is that I connected up with my CyberPanel Account, and am studying it presently for installing on my VPS 9.
Terminal
Thank you to Post4VPS and VirMach for my awesome VPS 9!  


Messages In This Thread
RE: Beware! PHP 8 may break old WP Themes! - by deanhills - 05-08-2021, 12:54 PM

person_pin_circle Users browsing this thread: 3 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting