PHP warning

ldap_connect(): Could not create session handle: Bad parameter to an ldap routine

/data/htdocs/sites/limesurvey/enquetes-test.univ-rennes1.fr-6.8.2/application/helpers/ldap_helper.php(31)

19 /*********************************************/
20 
21 
22 function ldap_getCnx($server_id = null)
23 {
24     $ldap_server = Yii::app()->getConfig('ldap_server');
25 
26     if (is_null($server_id)) {
27         return false;
28     } else {
29         $ds = false;
30         if ($ldap_server[$server_id]['protoversion'] == 'ldapv3' && $ldap_server[$server_id]['encrypt'] != 'ldaps') {
31             $ds = ldap_connect("ldap://" . "{$ldap_server[$server_id]['server']}:{$ldap_server[$server_id]['port']}");
32             ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
33 
34             if (!$ldap_server[$server_id]['referrals']) {
35                 ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
36             }
37 
38             if ($ldap_server[$server_id]['encrypt'] == 'start-tls') {
39                 ldap_start_tls($ds);
40             }
41         } elseif ($ldap_server[$server_id]['protoversion'] == 'ldapv2') {
42             if ($ldap_server[$server_id]['encrypt'] == 'ldaps') {
43                 $ds = ldap_connect("ldaps://" . "{$ldap_server[$server_id]['server']}:{$ldap_server[$server_id]['port']}");

Stack Trace

#0
+
 /data/htdocs/sites/limesurvey/enquetes-test.univ-rennes1.fr-6.8.2/application/helpers/ldap_helper.php(31): ldap_connect("ldap://ldaps://ldap.univ-rennes1.fr:636")
26     if (is_null($server_id)) {
27         return false;
28     } else {
29         $ds = false;
30         if ($ldap_server[$server_id]['protoversion'] == 'ldapv3' && $ldap_server[$server_id]['encrypt'] != 'ldaps') {
31             $ds = ldap_connect("ldap://" . "{$ldap_server[$server_id]['server']}:{$ldap_server[$server_id]['port']}");
32             ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
33 
34             if (!$ldap_server[$server_id]['referrals']) {
35                 ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
36             }
#1
+
 /data/htdocs/sites/limesurvey/enquetes-test.univ-rennes1.fr-6.8.2/application/controllers/admin/Tokens.php(1980): ldap_getCnx(0)
1975                     $attrlist[] = $ldap_queries[$ldapq][$attr];
1976                 }
1977             }
1978 
1979             // Open connection to server
1980             $ds = ldap_getCnx($ldap_server_id);
1981 
1982             if ($ds) {
1983                 // bind to server
1984                 $resbind = ldap_bindCnx($ds, $ldap_server_id);
1985 
#4
+
 /data/htdocs/sites/limesurvey/enquetes-test.univ-rennes1.fr-6.8.2/application/core/SurveyCommonAction.php(83): CAction->runWithParamsInternal(Tokens, ReflectionMethod, array("surveyid" => "312655", "sa" => "importldap", "iSurveyId" => "312655", "iSurveyID" => "312655", ...))
78             $oMethod = new ReflectionMethod($this, $sDefault);
79         }
80 
81         // We're all good to go, let's execute it
82         // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
83         return parent::runWithParamsInternal($this, $oMethod, $params);
84     }
85 
86     /**
87      * Some functions have different parameters, which are just an alias of the
88      * usual parameters we're getting in the url. This function just populates
2024-12-20 09:26:43 Apache/2 Yii Framework/1.1.30
Sommaire du rapport de profilage (Durée: 0.12020s, Memoire: 4,577KB)
Fonction Nb Total (s) Moy. (s) Min. (s) Max. (s)
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_surveys_groupsettings`) 1 0.00317 0.00317 0.00317 0.00317
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_users`) 1 0.00310 0.00310 0.00310 0.00310
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_surveys`) 1 0.00464 0.00464 0.00464 0.00464
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_settings_global`) 1 0.00275 0.00275 0.00275 0.00275
system.db.CDbCommand.query(SHOW CREATE TABLE `lime_settings_global`) 1 0.00057 0.00057 0.00057 0.00057
system.db.CDbCommand.query(SELECT * FROM `lime_settings_global` `t`) 1 0.00129 0.00129 0.00129 0.00129
system.db.CDbCommand.query(SELECT * FROM `lime_users` `t` WHERE `t`.`uid`=2 LIMIT 1) 2 0.00114 0.00057 0.00056 0.00058
system.db.CDbCommand.query(SELECT `t1`.`message` AS `message`, `t2`.`translation` AS `translation` FROM `lime_source_message` `t1`, `lime_message` `t2` WHERE t1.id=t2.id AND t1.category=:category AND t2.language=:language. Bound with :category='', :language='fr') 1 0.00093 0.00093 0.00093 0.00093
system.db.CDbCommand.query(SELECT * FROM `lime_users` `t` WHERE ((expires > :now OR expires IS NULL) AND (user_status = :active)) AND (`t`.`uid`=2) LIMIT 1. Bound with :now='2024-12-20 09:26:43', :active='1') 1 0.00067 0.00067 0.00067 0.00067
system.db.CDbCommand.query(SHOW CREATE TABLE `lime_users`) 1 0.00058 0.00058 0.00058 0.00058
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_plugins`) 1 0.00255 0.00255 0.00255 0.00255
system.db.CDbCommand.query(SHOW CREATE TABLE `lime_surveys`) 1 0.00087 0.00087 0.00087 0.00087
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_templates`) 1 0.00264 0.00264 0.00264 0.00264
system.db.CDbCommand.query(SELECT * FROM `lime_surveys` `t` WHERE `t`.`sid`=312655 LIMIT 1) 1 0.00104 0.00104 0.00104 0.00104
system.db.CDbCommand.query(SELECT * FROM `lime_plugins` `t` WHERE `t`.`active`=:yp0 ORDER BY priority DESC. Bound with :yp0=1) 1 0.00080 0.00080 0.00080 0.00080
system.db.CDbCommand.query(SELECT * FROM `lime_templates` `t` WHERE `t`.`name`='UNIVRENNES_BLEU' LIMIT 1) 1 0.00065 0.00065 0.00065 0.00065
system.db.CDbCommand.query(SHOW CREATE TABLE `lime_plugins`) 1 0.00054 0.00054 0.00054 0.00054
system.db.CDbCommand.query(SHOW CREATE TABLE `lime_templates`) 1 0.00054 0.00054 0.00054 0.00054
system.db.CDbCommand.query(SHOW CREATE TABLE `lime_surveys_groupsettings`) 1 0.00077 0.00077 0.00077 0.00077
system.db.CDbCommand.query(SELECT * FROM `lime_settings_global` `t` WHERE stg_name=:name LIMIT 1. Bound with :name='DBVersion') 1 0.00061 0.00061 0.00061 0.00061
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_surveys_groups`) 1 0.00208 0.00208 0.00208 0.00208
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_template_configuration`) 1 0.00194 0.00194 0.00194 0.00194
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_permissions`) 1 0.00148 0.00148 0.00148 0.00148
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_user_in_permissionrole`) 1 0.00124 0.00124 0.00124 0.00124
system.db.CDbCommand.query(SELECT `t`.`gsid` AS `t0_c0`, `t`.`owner_id` AS `t0_c1`, `t`.`admin` AS `t0_c2`, `t`.`adminemail` AS `t0_c3`, `t`.`anonymized` AS `t0_c4`, `t`.`format` AS `t0_c5`, `t`.`savetimings` AS `t0_c6`, `t`.`template` AS `t0_c7`, `t`.`datestamp` AS `t0_c8`, `t`.`usecookie` AS `t0_c9`, `t`.`allowregister` AS `t0_c10`, `t`.`allowsave` AS `t0_c11`, `t`.`autonumber_start` AS `t0_c12`, `t`.`autoredirect` AS `t0_c13`, `t`.`allowprev` AS `t0_c14`, `t`.`printanswers` AS `t0_c15`, `t`.`ipaddr` AS `t0_c16`, `t`.`ipanonymize` AS `t0_c17`, `t`.`refurl` AS `t0_c18`, `t`.`showsurveypolicynotice` AS `t0_c19`, `t`.`publicstatistics` AS `t0_c20`, `t`.`publicgraphs` AS `t0_c21`, `t`.`listpublic` AS `t0_c22`, `t`.`htmlemail` AS `t0_c23`, `t`.`sendconfirmation` AS `t0_c24`, `t`.`tokenanswerspersistence` AS `t0_c25`, `t`.`assessments` AS `t0_c26`, `t`.`usecaptcha` AS `t0_c27`, `t`.`bounce_email` AS `t0_c28`, `t`.`attributedescriptions` AS `t0_c29`, `t`.`emailresponseto` AS `t0_c30`, `t`.`emailnotificationto` AS `t0_c31`, `t`.`tokenlength` AS `t0_c32`, `t`.`showxquestions` AS `t0_c33`, `t`.`showgroupinfo` AS `t0_c34`, `t`.`shownoanswer` AS `t0_c35`, `t`.`showqnumcode` AS `t0_c36`, `t`.`showwelcome` AS `t0_c37`, `t`.`showprogress` AS `t0_c38`, `t`.`questionindex` AS `t0_c39`, `t`.`navigationdelay` AS `t0_c40`, `t`.`nokeyboard` AS `t0_c41`, `t`.`alloweditaftercompletion` AS `t0_c42`, `SurveysGroups`.`gsid` AS `t1_c0`, `SurveysGroups`.`name` AS `t1_c1`, `SurveysGroups`.`title` AS `t1_c2`, `SurveysGroups`.`template` AS `t1_c3`, `SurveysGroups`.`description` AS `t1_c4`, `SurveysGroups`.`sortorder` AS `t1_c5`, `SurveysGroups`.`owner_id` AS `t1_c6`, `SurveysGroups`.`parent_id` AS `t1_c7`, `SurveysGroups`.`alwaysavailable` AS `t1_c8`, `SurveysGroups`.`created` AS `t1_c9`, `SurveysGroups`.`modified` AS `t1_c10`, `SurveysGroups`.`created_by` AS `t1_c11` FROM `lime_surveys_groupsettings` `t` LEFT OUTER JOIN `lime_surveys_groups` `SurveysGroups` ON (`SurveysGroups`.`gsid`=`t`.`gsid`) WHERE (`t`.`gsid`=1)) 1 0.00094 0.00094 0.00094 0.00094
system.db.CDbCommand.query(SELECT `t`.`template_name` AS `t0_c1`, `t`.`id` AS `t0_c0`, `template`.`id` AS `t1_c0`, `template`.`folder` AS `t1_c2`, `template`.`name` AS `t1_c1` FROM `lime_template_configuration` `t` LEFT OUTER JOIN `lime_templates` `template` ON (`template`.`name`=`t`.`template_name`) WHERE (sid IS NULL AND gsid IS NULL AND template.folder IS NOT NULL)) 1 0.00074 0.00074 0.00074 0.00074
system.db.CDbCommand.query(SELECT * FROM `lime_surveys_groupsettings` `t` WHERE `t`.`gsid`=0 LIMIT 1) 1 0.00071 0.00071 0.00071 0.00071
system.db.CDbCommand.query(SHOW CREATE TABLE `lime_permissions`) 1 0.00052 0.00052 0.00052 0.00052
system.db.CDbCommand.query(SHOW CREATE TABLE `lime_surveys_groups`) 1 0.00051 0.00051 0.00051 0.00051
system.db.CDbCommand.query(SELECT * FROM `lime_permissions` `t` WHERE `t`.`entity_id`=:yp0 AND `t`.`entity`=:yp1 AND `t`.`uid`=:yp2 AND `t`.`permission`=:yp3 LIMIT 1. Bound with :yp0=0, :yp1='global', :yp2=2, :yp3='superadmin') 1 0.00049 0.00049 0.00049 0.00049
system.db.CDbCommand.query(SHOW CREATE TABLE `lime_template_configuration`) 1 0.00046 0.00046 0.00046 0.00046
system.db.CDbCommand.query(SHOW CREATE TABLE `lime_user_in_permissionrole`) 1 0.00046 0.00046 0.00046 0.00046
system.db.CDbCommand.query(SHOW TABLES) 1 0.00208 0.00208 0.00208 0.00208
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_surveys_languagesettings`) 1 0.00167 0.00167 0.00167 0.00167
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `lime_tokens_312655`) 1 0.00130 0.00130 0.00130 0.00130
system.db.CDbCommand.query(SELECT `t`.`surveyls_survey_id` AS `t0_c0`, `t`.`surveyls_language` AS `t0_c1`, `t`.`surveyls_title` AS `t0_c2`, `t`.`surveyls_description` AS `t0_c3`, `t`.`surveyls_welcometext` AS `t0_c4`, `t`.`surveyls_endtext` AS `t0_c5`, `t`.`surveyls_policy_notice` AS `t0_c6`, `t`.`surveyls_policy_error` AS `t0_c7`, `t`.`surveyls_policy_notice_label` AS `t0_c8`, `t`.`surveyls_url` AS `t0_c9`, `t`.`surveyls_urldescription` AS `t0_c10`, `t`.`surveyls_email_invite_subj` AS `t0_c11`, `t`.`surveyls_email_invite` AS `t0_c12`, `t`.`surveyls_email_remind_subj` AS `t0_c13`, `t`.`surveyls_email_remind` AS `t0_c14`, `t`.`surveyls_email_register_subj` AS `t0_c15`, `t`.`surveyls_email_register` AS `t0_c16`, `t`.`surveyls_email_confirm_subj` AS `t0_c17`, `t`.`surveyls_email_confirm` AS `t0_c18`, `t`.`surveyls_dateformat` AS `t0_c19`, `t`.`surveyls_attributecaptions` AS `t0_c20`, `t`.`surveyls_alias` AS `t0_c21`, `t`.`email_admin_notification_subj` AS `t0_c22`, `t`.`email_admin_notification` AS `t0_c23`, `t`.`email_admin_responses_subj` AS `t0_c24`, `t`.`email_admin_responses` AS `t0_c25`, `t`.`surveyls_numberformat` AS `t0_c26`, `t`.`attachments` AS `t0_c27`, `survey`.`sid` AS `t1_c0`, `survey`.`owner_id` AS `t1_c1`, `survey`.`gsid` AS `t1_c2`, `survey`.`admin` AS `t1_c3`, `survey`.`active` AS `t1_c4`, `survey`.`expires` AS `t1_c5`, `survey`.`startdate` AS `t1_c6`, `survey`.`adminemail` AS `t1_c7`, `survey`.`anonymized` AS `t1_c8`, `survey`.`format` AS `t1_c9`, `survey`.`savetimings` AS `t1_c10`, `survey`.`template` AS `t1_c11`, `survey`.`language` AS `t1_c12`, `survey`.`additional_languages` AS `t1_c13`, `survey`.`datestamp` AS `t1_c14`, `survey`.`usecookie` AS `t1_c15`, `survey`.`allowregister` AS `t1_c16`, `survey`.`allowsave` AS `t1_c17`, `survey`.`autonumber_start` AS `t1_c18`, `survey`.`autoredirect` AS `t1_c19`, `survey`.`allowprev` AS `t1_c20`, `survey`.`printanswers` AS `t1_c21`, `survey`.`ipaddr` AS `t1_c22`, `survey`.`ipanonymize` AS `t1_c23`, `survey`.`refurl` AS `t1_c24`, `survey`.`datecreated` AS `t1_c25`, `survey`.`showsurveypolicynotice` AS `t1_c26`, `survey`.`publicstatistics` AS `t1_c27`, `survey`.`publicgraphs` AS `t1_c28`, `survey`.`listpublic` AS `t1_c29`, `survey`.`htmlemail` AS `t1_c30`, `survey`.`sendconfirmation` AS `t1_c31`, `survey`.`tokenanswerspersistence` AS `t1_c32`, `survey`.`assessments` AS `t1_c33`, `survey`.`usecaptcha` AS `t1_c34`, `survey`.`usetokens` AS `t1_c35`, `survey`.`bounce_email` AS `t1_c36`, `survey`.`attributedescriptions` AS `t1_c37`, `survey`.`emailresponseto` AS `t1_c38`, `survey`.`emailnotificationto` AS `t1_c39`, `survey`.`tokenlength` AS `t1_c40`, `survey`.`showxquestions` AS `t1_c41`, `survey`.`showgroupinfo` AS `t1_c42`, `survey`.`shownoanswer` AS `t1_c43`, `survey`.`showqnumcode` AS `t1_c44`, `survey`.`bouncetime` AS `t1_c45`, `survey`.`bounceprocessing` AS `t1_c46`, `survey`.`bounceaccounttype` AS `t1_c47`, `survey`.`bounceaccounthost` AS `t1_c48`, `survey`.`bounceaccountpass` AS `t1_c49`, `survey`.`bounceaccountencryption` AS `t1_c50`, `survey`.`bounceaccountuser` AS `t1_c51`, `survey`.`showwelcome` AS `t1_c52`, `survey`.`showprogress` AS `t1_c53`, `survey`.`questionindex` AS `t1_c54`, `survey`.`navigationdelay` AS `t1_c55`, `survey`.`nokeyboard` AS `t1_c56`, `survey`.`alloweditaftercompletion` AS `t1_c57`, `survey`.`googleanalyticsstyle` AS `t1_c58`, `survey`.`googleanalyticsapikey` AS `t1_c59`, `survey`.`tokenencryptionoptions` AS `t1_c60` FROM `lime_surveys_languagesettings` `t` LEFT OUTER JOIN `lime_surveys` `survey` ON (t.surveyls_survey_id = survey.sid) WHERE (`t`.`surveyls_survey_id`=312655 AND `t`.`surveyls_language`='fr')) 1 0.00082 0.00082 0.00082 0.00082
system.db.CDbCommand.query(SHOW CREATE TABLE `lime_surveys_languagesettings`) 1 0.00066 0.00066 0.00066 0.00066
system.db.CDbCommand.query(SELECT `languagesettings`.`surveyls_survey_id` AS `t1_c0`, `languagesettings`.`surveyls_language` AS `t1_c1`, `languagesettings`.`surveyls_title` AS `t1_c2`, `languagesettings`.`surveyls_description` AS `t1_c3`, `languagesettings`.`surveyls_welcometext` AS `t1_c4`, `languagesettings`.`surveyls_endtext` AS `t1_c5`, `languagesettings`.`surveyls_policy_notice` AS `t1_c6`, `languagesettings`.`surveyls_policy_error` AS `t1_c7`, `languagesettings`.`surveyls_policy_notice_label` AS `t1_c8`, `languagesettings`.`surveyls_url` AS `t1_c9`, `languagesettings`.`surveyls_urldescription` AS `t1_c10`, `languagesettings`.`surveyls_email_invite_subj` AS `t1_c11`, `languagesettings`.`surveyls_email_invite` AS `t1_c12`, `languagesettings`.`surveyls_email_remind_subj` AS `t1_c13`, `languagesettings`.`surveyls_email_remind` AS `t1_c14`, `languagesettings`.`surveyls_email_register_subj` AS `t1_c15`, `languagesettings`.`surveyls_email_register` AS `t1_c16`, `languagesettings`.`surveyls_email_confirm_subj` AS `t1_c17`, `languagesettings`.`surveyls_email_confirm` AS `t1_c18`, `languagesettings`.`surveyls_dateformat` AS `t1_c19`, `languagesettings`.`surveyls_attributecaptions` AS `t1_c20`, `languagesettings`.`surveyls_alias` AS `t1_c21`, `languagesettings`.`email_admin_notification_subj` AS `t1_c22`, `languagesettings`.`email_admin_notification` AS `t1_c23`, `languagesettings`.`email_admin_responses_subj` AS `t1_c24`, `languagesettings`.`email_admin_responses` AS `t1_c25`, `languagesettings`.`surveyls_numberformat` AS `t1_c26`, `languagesettings`.`attachments` AS `t1_c27` FROM `lime_surveys_languagesettings` `languagesettings` WHERE (`languagesettings`.`surveyls_survey_id`=:ypl0). Bound with :ypl0='312655') 1 0.00062 0.00062 0.00062 0.00062
system.db.CDbCommand.query(SHOW CREATE TABLE `lime_tokens_312655`) 1 0.00047 0.00047 0.00047 0.00047
system.db.CDbCommand.query(SELECT `owner`.`uid` AS `t1_c0`, `owner`.`users_name` AS `t1_c1`, `owner`.`password` AS `t1_c2`, `owner`.`full_name` AS `t1_c3`, `owner`.`parent_id` AS `t1_c4`, `owner`.`lang` AS `t1_c5`, `owner`.`email` AS `t1_c6`, `owner`.`htmleditormode` AS `t1_c7`, `owner`.`templateeditormode` AS `t1_c8`, `owner`.`questionselectormode` AS `t1_c9`, `owner`.`one_time_pw` AS `t1_c10`, `owner`.`dateformat` AS `t1_c11`, `owner`.`last_login` AS `t1_c12`, `owner`.`created` AS `t1_c13`, `owner`.`modified` AS `t1_c14`, `owner`.`validation_key` AS `t1_c15`, `owner`.`validation_key_expiration` AS `t1_c16`, `owner`.`last_forgot_email_password` AS `t1_c17`, `owner`.`expires` AS `t1_c18`, `owner`.`user_status` AS `t1_c19` FROM `lime_users` `owner` WHERE (`owner`.`uid`=:ypl0). Bound with :ypl0='2') 1 0.00044 0.00044 0.00044 0.00044
system.db.CDbCommand.query(SELECT * FROM `lime_user_in_permissionrole` `t` WHERE `t`.`uid`=:yp0. Bound with :yp0=2) 1 0.00036 0.00036 0.00036 0.00036