Lunarpages Web Hosting Forum

Author Topic: PHP 7.1 support on LP domains/  (Read 383 times)

Offline Freewheeler.Ken

  • Newbie
  • *
  • Posts: 2
PHP 7.1 support on LP domains/
« on: January 04, 2019, 01:25:01 PM »

When will PHP 7.1 be available here? Scripts are returning errors due to deprecated functions.

Error
We have detected that your server is using PHP 7.0.33 which is obsolete and no longer receives official security updates by its developers. The Joomla! Project recommends upgrading your site to PHP 7.1 or later which will receive security updates at least until 2019-12-01. Please ask your host to make PHP 7.1 or a later version the default version for your site. If your host is already PHP 7.1 ready please enable PHP 7.1 on your site's root and 'administrator' directories typically you can do this yourself through a tool in your hosting control panel, but it's best to ask your host if you are unsure.

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6404
Re: PHP 7.1 support on LP domains/
« Reply #1 on: January 04, 2019, 03:19:24 PM »
At least, you're already at 7.0. My server is stuck at 5.6, and there's no word on when it will be updated. They tell me it's "in the works", but won't say when. Considering that everything less than 7.1 is out of support, this is absurd.

If you are getting "deprecated" warnings, upgrading PHP is only going to make it worse. Your software (such as Joomla) needs to be upgraded to match the PHP you have now (7.0). Joomla is telling you to go to 7.1 because that's what is supported, not because it will get rid of "deprecated" errors. Simply upgrading to 7.1 is only going to make the current errors worse.
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6404
Re: PHP 7.1 support on LP domains/
« Reply #2 on: January 21, 2019, 07:39:55 AM »
Note that PHP 7.2 has been out for a while now, but it brings problems with it. Supposedly it is much stricter in its implementation of the PHP language, and code which works fine up through PHP 7.1 will give lots of warnings and errors on 7.2. So, heads up if you are offered PHP 7.2 for your site -- your site software will need extensive testing (and probably a lot of fixes) before you go live with it.
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-

Offline Malin Cenusa

  • Junior System Administrator
  • Support
  • Spaceship Navigator
  • *****
  • Posts: 87
  • The World Is Not Enough
    • Solutions Straight from Tech Support
Re: PHP 7.1 support on LP domains/
« Reply #3 on: January 22, 2019, 07:12:15 AM »
We already offer PHP 7.2 on some our servers and it will be deployed on all as soon as possible. If you do not have PHP 7.2 available on the server where your account is hosted please open a ticket with our support staff and we will have it activated.
Malin Cenusa

Junior System Administrator - Managed Shared Hosting Team

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6404
Re: PHP 7.1 support on LP domains/
« Reply #4 on: January 22, 2019, 07:25:25 AM »
If you're offering 7.2, please make sure 7.1 is also available. As I said, a lot of existing site software that is happy on 7.1 is going to be spewing warnings and errors with 7.2 because that version is (supposedly) much stricter. Eventually all site software needs to be migrated or updated to PHP 7.2 support, but give us a transition period where we can fall back to 7.1 (and even to 5.6 in severe cases) while we update our software. Directory-by-directory ability to set the PHP level would be good, too. For example, if my shop (osCommerce) is 7.1-ready but my forum (SMF) is only 5.6 or 7.0-ready, it would be good to be able to run the different applications at different PHP levels until they're all brought up to date. While SMF is running production at, say, 5.6, I can have a test copy running at 7.2 and make fixes there. When done, I can switch production SMF to 7.2 while I do something similar for upgrading osCommerce.

And, as I've requested before, pointers to a syntax-checking tool for PHP 7.x versions would be most useful -- we could get a head-start on upgrading while still running at 5.6. Does LP have such a tool installed, or can you recommend a third-party tool?
« Last Edit: January 22, 2019, 07:39:38 AM by MrPhil »
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6404
Re: PHP 7.1 support on LP domains/
« Reply #5 on: January 23, 2019, 03:53:54 PM »
Hooray! My server (Mizar) has been upgraded with the new Apache server. cPanel now offers MultiPHP. In addition to 5.6 I can select 7.1 or 7.2. I just set my site to PHP 7.1, and so far it seems to be working OK. My only disappointment is that it appears that it's all or nothing -- it didn't seem to put an entry in .htaccess or php.ini, so it looks like I can't put different parts of my site under different PHP levels if I need that.

Has anyone learned of a way to set different PHP levels in different directories?

In addition to MultiPHP to select level, there's some sort of INI Editor. I don't know if it really gives any new capability, or is just a wizard to help out.
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-