Update to 3.1.14 has PHP>=5.4 code

Discussion in 'Installation/Configuration' started by TechNyquist, Jul 9, 2019.

  1. TechNyquist

    TechNyquist New Member

    Hello everyone,
    I see forum is pretty hot at the moment as update was released so I'll post a simple one to let me understand.
    I'm on CentOS 6 and using succesfully your great software.
    Now, last two updates failed because of a PHP syntax error right after the question "Create new ISPConfig SSL certificate (yes,no) [no]:", and the error is the following:

    PHP Parse error: syntax error, unexpected '[' in /usr/local/ispconfig/server/plugins-available/powerdns_plugin.inc.php on line 535
    I checked out that line and found that there two arrays are declared with "$somename = [];" that is array syntax sugar available from PHP 5.4 . I'm using PHP 5.3.3 so it failed both updates to 3.1.14 and to 3.1.14p1 .

    Now my question is: was the minimum required PHP version for ISPConfig raised (thus I'm outdated) or is this a bug (thus it needs a fix) ?
    Thank you.
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    I suspect it's a regression, not that minimum requirements changed. If you change the initializations from '[]' to 'array()' does the update continue without further issues?
     
  3. TechNyquist

    TechNyquist New Member

    Hi Jesse, thank you for reply
    I tried that launching again the "ispconfig_update.sh" after the edit, but the script now says that there are no more updates and quits. If you know of a way to "force" the update I'll let you know in minutes.
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Download the ISPConfig installer package. and run the update script from there. That forces the update to run.
     
  5. budgierless

    budgierless Member HowtoForge Supporter

    Wrong dude, the system requirements have changed, for example: ubuntu 8.04-18.04 for ispconfig 3.1.13p1 but only ubuntu 16.04-18.04 for ispconfig 3.1.14+
     
    Jesse Norell likes this.
  6. TechNyquist

    TechNyquist New Member

    Ok, it took me a bit more than expected because those two instructions were not enough.
    Follows the complete list of editings required to make the update PHP 5.3 compliant.
    All the edits are from file: ispconfig/server/plugins-available/powerdns_plugin.inc.php
    • Line 535:
      $pubkeys = [];
      became
      $pubkeys = array();
    • Line 552:
      $formatted = [];
      became
      $formatted = array();
    • Line 542:
      $dnssec_info = array_merge($this->format_dnssec_pubkeys($pubkeys), ['', '== Raw log ============================'], $log);
      became
      $dnssec_info = array_merge($this->format_dnssec_pubkeys($pubkeys), array('', '== Raw log ============================'), $log);
    • Line 573:
      if (!in_array($key_type, ['KSK', 'CSK'], true)) {
      became
      if (!in_array($key_type, array('KSK', 'CSK'), true)) {
    • Line 676:
      $dnssec_info = array_merge(['== Raw log ============================'], $log);
      became
      $dnssec_info = array_merge(array('== Raw log ============================'), $log);
    This way I reached the final "Update finished." .
     
  7. budgierless

    budgierless Member HowtoForge Supporter

    Like i said php support for 3.1.14 is now only limited cover form the last 2-3 years, i your php is too old, you can only use ispconfig upto 3.1.13p1 on your system.
     
  8. TechNyquist

    TechNyquist New Member

    Cross-posting: sorry, didn't read your post because you posted while I was completing my post.
    Ok, so the final answer is "I'm outdated". Alright, I'll update my system.

    Where can I track the PHP version that ISPConfig will need from now on?
     
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    ISPConfig needs the PHP version that comes standard with the operating system that ISPConfig supports. If the OS is out of support, newer versions of ISPConfig may no longer support that old system with it's old PHP version.
     
  10. TechNyquist

    TechNyquist New Member

    Alright.
    Thank you and good job.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    We will probably backport the code of that plugin to be compatible with older PHP releases, but just as it's not a big deal to do so and the only drawback is a bit longer code. As mentioned in the release notes, we started to abandon very old operating system versions as they limit us in development and php 5.3 is so old now that it's time to stop supporting it.
     
  12. TechNyquist

    TechNyquist New Member

    I plenty agree with you.
    Indeed I'll update my system as time as come to do it; PHP 5.3 is old now, and this just gives you a clue about how long is I'm using your great manager :) by the way, keep it up!
     
    till likes this.
  13. labsy

    labsy Member

    Hi, eny ETA on this issue? The latest ISPConfig version as of now is 3.1.15p1, which is not compatible with PHP<5.4 due to powerdns_plugin.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    I pushed the changes to git-stable branch now.
     
    labsy likes this.
  15. labsy

    labsy Member

    Thank you, Till!
    BTW...can you push me in right directions with manually editing the old file? I run the ispconfig_update.sh script, pause right before it asks me to create new SSL cert, then I open separate SSH window, manually plant the MODIFIED file /usr/local/ispconfig/server/plugins-available/powerdns_plugin.inc.php then let the update script continue. But then obviously script pulls the powerdns_plugin.inc.php file from somewhere and replaces my modified file with its own, uncompatible file.
    I am obviously doing something wrong. Any idea what?
     
  16. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Did you choose git-stable as the source?
     
  17. labsy

    labsy Member

    Probably not, as I have no idea how to do this. I just ran ispconfig_update.sh on server.
    ***EDIT***
    Sorry, my bad...I did it now, just read what ispconfig_update.sh offers me and it went just fine now. Thank you both, Jesse & Till!
    It is the first question when starting ispconfig_update.sh:
    Code:
    Select update method (stable,git-stable,git-master) [stable]: git-stable
     
    Last edited: Oct 16, 2019
  18. labsy

    labsy Member

    BTW...the latest git-stable version has deal-breaker, which prevents ISPConfig to operate:
    PHP Parse error: syntax error, unexpected '[', expecting ')' in /usr/local/ispconfig/server/lib/classes/monitor_tools.inc.php on line 257
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no deal-breaker, I use the current git-stable in production. The code is fine, it's just your old PHP version again. I'll change the code this time, but this will be the last patch release where we will support such ancient PHP versions.
     
  20. labsy

    labsy Member

    Thank you, Till! The mentioned error prevents me from running any ISPCOnfig jobs, as they just get stuck on the row, with increased red-dot job indicator. You will save my day with one more downported version.

    But please, understand that I am very well aware of my ancient PHP version on this server, but I have 247 customers on this server with 300+ web sites....indeed they are all hosted for bargain, but they are still customers and I am sure I WILL break most of those web sites if I go:
    - Linux release-upgrade from 12.04 to any higher version
    - because Apache changes are significant from 2.2 to 2.4
    - to be able to upgrade PHP to any version higher than 5.3
    I've tried two times with all the upgrades, but I ended up two days later with snapshot reverting back to older version, as it did not work.
    So probably the only reliable way for me is to migrate hosted web sites one by one to one of newer servers and this is time and resource consuming process, which I will never get paid for. And it makes me wondering if I should even continue running this low-profitable hosting business...but that's another story.
     

Share This Page