leenooks / phpLDAPadmin

phpLDAPadmin - Web based LDAP administration tool
www.phpldapadmin.org
GNU General Public License v2.0
523 stars 166 forks source link

Parse error: systax error, unexpected '=' in /srv/www/phpLDAPadmin-1.2.6.5/lib/functions.php on line 361 #185

Closed el-piewie closed 1 year ago

el-piewie commented 1 year ago

Unfortunately a new installation of PLA 1.2.6.5 throws this error: Parse error: systax error, unexpected '=' in /srv/www/phpLDAPadmin-1.2.6.5/lib/functions.php on line 361 on SLES 12 with apache and php-7. How could it be fixed?

bendem commented 1 year ago

This is this line, which fixes #165. https://github.com/leenooks/phpLDAPadmin/blob/c84b2d6d9147d4d06b5852bdde7d4d4334b2e535/lib/functions.php#L361

That syntax is not compatible with php < 7.1. You will need to upgrade to at least that. Reminder that php7.0 has been out of support for many years, you should use 7.4 at least if you can't upgrade to 8.x yet.

https://www.php.net/manual/en/migration71.new-features.php#migration71.new-features.symmetric-array-destructuring https://www.php.net/supported-versions.php

bendem commented 1 year ago

Note that SLES 12 is php 7.4 since SP5: https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12-SP5/index.html#jsc-SLE-12474. Older versions are not supported since 2021. https://scc.suse.com/docs/lifecycle/sle/12/modules

el-piewie commented 1 year ago

Thx for the hint and your fast reply. It looks much better now ;-)

el-piewie commented 1 year ago

After login it gets to ERROR "E_WARNING: openssl_encrypt(): setting of IV length for AEAD mode failed" now. openssl-1.0.2p-fips php74-openssl-7.4.33