yourls-ldap-plugin
yourls-ldap-plugin copied to clipboard
Activation displays HTTP ERROR 500
Hi, I have downloaded the plugin, uploaded it to the plugin directory, edited the config.php and added the following lines
define( 'LDAPAUTH_HOST', 'our ldap host' ); // LDAP host name, IP or URL. You can use ldaps://host for LDAP with TLS
define( 'LDAPAUTH_PORT', '636' ); // LDAP server port - often 389 or 636 for TLS (LDAPS)
define( 'LDAPAUTH_BASE', 'our base dn' ); // Base DN (location of users)
define( 'LDAPAUTH_USERNAME_FIELD', 'name'); // (optional) LDAP field name in which username is store
These settings I have taken from another application that is working with our LDAP server,
When I go to the plugin window and click activate the site fails to load
This page isn’t working URL is currently unable to handle this request. HTTP ERROR 500
The error log is showing this
[Thu May 03 10:58:52.083755 2018] [fcgid:warn] [pid 11601] [client IP:52939] mod_fcgid: stderr: PHP Parse error: syntax error, unexpected ')', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in home/web/user/plugins/ldap/plugin.php on line 138, referer: https://URL/admin/plugins.php
Lines 137 - 140,
// session is only needed if we don't use usercache
if (empty(LDAPAUTH_USERCACHE_TYPE)) {
@session_start();
}
According to the following page, the empty function should be, in that case, replaced by a defined function https://stackoverflow.com/questions/18863625/parse-error-syntax-error-unexpected-expecting-t-paamayim-nekudotayim