leenooks / phpLDAPadmin

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

Parse error: syntax error, unexpected '=' in /usr/local/apache2/htdocs/phpLDAPadmin/lib/functions.php on line 361 #258

Open OceanWaives opened 9 months ago

OceanWaives commented 9 months ago

enviroment: apache-httpd-2.4.58 openldap-2.5.17 php 7.0.0 phpLDAPadmin-1.2.6.7

when i browser phpLDAPadmin/htdocs/index.php. It reports :Parse error: syntax error, unexpected '=' in /usr/local/apache2/htdocs/phpLDAPadmin/lib/functions.php on line 361

1

williamdes commented 9 months ago

What version of phpldapadmin are you using?

OceanWaives commented 9 months ago

What version of phpldapadmin are you using?

I am using phpLDAPadmin-1.2.6.7.tar.gz.
download link:https://github.com/leenooks/phpLDAPadmin/archive/refs/tags/1.2.6.7.tar.gz

Thank you for replyling. Sorry for that i did not write down issue details clearly. I have added in the issues details.

williamdes commented 9 months ago

https://github.com/leenooks/phpLDAPadmin/blob/d59cbfef5d8a78da55e4c1919862e9e3968b3715/lib/functions.php#L361

Are you sure that you are really using PHP 7?

Skgland commented 9 months ago

Symmetric array destructuring is a feature of php 7.1 so 7.0 is too old, the readme.md list the php requirement as 7.2, install.md appears to be outdated.

williamdes commented 9 months ago

@leenooks can you push a patch?

OceanWaives commented 9 months ago

Symmetric array destructuring is a feature of php 7.1 so 7.0 is too old, the readme.md list the php requirement as 7.2, install.md appears to be outdated.

exactly right,the php version requirement on install.md is not consistent with readme.md,i only followd the install.md.

Another information: using php 8.3.3 also report a mistake: Unrecognized error number: 8192: Creation of dynamic property page::$index is deprecated. It is probably because php 8.2 and later setting a value to an undeclared class property is deprecated.

1

williamdes commented 9 months ago

For dynamic properties see #202