Skip to content
Snippets Groups Projects
Commit b1bae55c authored by Thijs Kinkhorst's avatar Thijs Kinkhorst
Browse files

Since PHP 5.3 is required, there's no need to treat users of 5.1.2-5.2...

Since PHP 5.3 is required, there's no need to treat users of 5.1.2-5.2 specially. Also we can safely use LDAP_OPT_NETWORK_TIMEOUT now.
parent c6326761
No related branches found
No related tags found
No related merge requests found
...@@ -90,11 +90,8 @@ class SimpleSAML_Auth_LDAP { ...@@ -90,11 +90,8 @@ class SimpleSAML_Auth_LDAP {
// (OpenLDAP 2.x.x or Netscape Directory SDK x.x needed). // (OpenLDAP 2.x.x or Netscape Directory SDK x.x needed).
$this->timeout = $timeout; $this->timeout = $timeout;
if ($timeout > 0) { if ($timeout > 0) {
if (defined('LDAP_OPT_NETWORK_TIMEOUT')) { if (!@ldap_set_option($this->ldap, LDAP_OPT_NETWORK_TIMEOUT, $timeout))
/* This option isn't present before PHP 5.3. */ SimpleSAML_Logger::warning('Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_NETWORK_TIMEOUT) to ' . $timeout);
if (!@ldap_set_option($this->ldap, constant('LDAP_OPT_NETWORK_TIMEOUT'), $timeout))
SimpleSAML_Logger::warning('Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_NETWORK_TIMEOUT) to ' . $timeout);
}
if (!@ldap_set_option($this->ldap, LDAP_OPT_TIMELIMIT, $timeout)) if (!@ldap_set_option($this->ldap, LDAP_OPT_TIMELIMIT, $timeout))
SimpleSAML_Logger::warning('Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_TIMELIMIT) to ' . $timeout); SimpleSAML_Logger::warning('Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_TIMELIMIT) to ' . $timeout);
} }
......
...@@ -25,8 +25,6 @@ function core_hook_sanitycheck(&$hookinfo) { ...@@ -25,8 +25,6 @@ function core_hook_sanitycheck(&$hookinfo) {
if (version_compare(phpversion(), '5.3', '>=')) { if (version_compare(phpversion(), '5.3', '>=')) {
$hookinfo['info'][] = '[core] You are running PHP version ' . phpversion() . '. Great.'; $hookinfo['info'][] = '[core] You are running PHP version ' . phpversion() . '. Great.';
} elseif( version_compare(phpversion(), '5.1.2', '>=')) {
$hookinfo['info'][] = '[core] You are running PHP version ' . phpversion() . '. It\'s recommended to upgrade to >= 5.2';
} else { } else {
$hookinfo['errors'][] = '[core] You are running PHP version ' . phpversion() . '. SimpleSAMLphp requires version >= 5.3. Please upgrade!'; $hookinfo['errors'][] = '[core] You are running PHP version ' . phpversion() . '. SimpleSAMLphp requires version >= 5.3. Please upgrade!';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment