Author Topic: 1.4.14 upgrade gives PHP Parse error in PEAR.php  (Read 6365 times)

Offline yosi

  • Newbie
  • *
  • Posts: 2
1.4.14 upgrade gives PHP Parse error in PEAR.php
« on: September 20, 2023, 10:08:41 AM »
Trying to upgrade from version 1.4.13 to 1.4.14 using the ./bin/installto.sh script generates the following error:
"PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /zWork/roundcubemail-1.4.14/vendor/pear/pear-core-minimal/src/PEAR.php on line 222"

Used roundcubemail-1.4.14-complete.tar.gz
All previous upgrade using this method went fine.

System info:
ClearOS release 7.9.1 (Final)
PEAR Version: 1.9.4
PHP Version: 5.4.16
Zend Engine Version: 2.4.0
Running on: Linux 3.10.0-1160.71.1.el7.x86_64 #1 SMP Tue Jun 28 15:37:28 UTC 2022 x86_64

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Re: 1.4.14 upgrade gives PHP Parse error in PEAR.php
« Reply #1 on: September 20, 2023, 12:19:38 PM »
Looks like pear/pear-core-minimal 1.10.13 broke compatibility with php 5.4. You have to bump php to 5.5 or use composer and force older version of pear. Or revert this change https://github.com/pear/pear-core-minimal/commit/aed862e95fd286c53cc546734868dc38ff4b5b1d

Offline yosi

  • Newbie
  • *
  • Posts: 2
Re: 1.4.14 upgrade gives PHP Parse error in PEAR.php
« Reply #2 on: September 20, 2023, 04:33:10 PM »
I'm running ClearOS 7.9.1 - highest possible version. It's fully based on CentOS 7.9.1. The default PHP version for CentOS 7.9.1 is PHP 5.4.16 (which can't be disabled) but it supports officialy PHP 7.X. ClearOS supports until PHP 7.3. ClearOS has a method to appoint specific PHP installed versions to specific virtual hosts. I managed to appoint PHP 7.3 to Roundcube and just upgraded Roundcube to 1.4.14. The broken compatibility for 1.4.14 and PHP 5.4.16 still exists but my problem is solved  :)