You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2011-07-06 15:49:18

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

[0.80.1] erreur sql ldap_mass_sync.php

SQL: INSERT
                   INTO `glpi_users` (`password`,`user_dn`,`date_sync`,`name`,`email`,`realname`,`firstname`,`phone`,`phone2`,`mobile`,`comment`,`usertitles_id`,`registration_number`,`is_active`,`authtype`,`auths_id`,`is_deleted`,`entities_id`,`profiles_id`,`date_mod`) VALUES (\'\',\'XXXXXXX\',\'2011-07-06 15:35:27\',\'login\',\email\',\'nom\',\'prenom\',\'6805\',\'\',\'\',\'\',0,\'\',\'1\',\'3\',\'2\',0,0,0,\'2011-07-06 15:35:27\')
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'user_dn' at line 2
Backtrace :
/usr/share/glpi/inc/commondbtm.class.php :355        DBmysql->query()
/usr/share/glpi/inc/commondbtm.class.php :665        CommonDBTM->addToDB()
/usr/share/glpi/inc/authldap.class.php :1595        CommonDBTM->add()
/usr/share/glpi/scripts/ldap_mass_sync.php :163        AuthLDAP::ldapImportUserByServerId()
/usr/share/glpi/scripts/ldap_mass_sync.php :118        import()

Problème sur le user_dn qui contient un apostrophe
ldap_mass_sync.php


Xavier Caillaud
Blog GLPI Infotel

Offline

#2 2011-07-06 17:07:02

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: [0.80.1] erreur sql ldap_mass_sync.php

la requete complète ? elle est tronquée là.


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#3 2011-07-06 17:09:55

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: [0.80.1] erreur sql ldap_mass_sync.php

Ben j'ai juste enlevé le userDN complet de l’utilisateur (pas top de publier ca) et donc c'est par exemple CN=Xavier CAILLAU\'D,OU=etc..


Xavier Caillaud
Blog GLPI Infotel

Offline

#4 2011-07-06 19:18:32

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: [0.80.1] erreur sql ldap_mass_sync.php

et tu as des trucs bizarres dans ce user_dn ?


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#5 2011-07-06 20:29:38

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: [0.80.1] erreur sql ldap_mass_sync.php

CAILLAU\'D

Ça coupe a ce niveau là


Xavier Caillaud
Blog GLPI Infotel

Offline

#6 2011-07-07 06:27:31

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: [0.80.1] erreur sql ldap_mass_sync.php

Tu as une quote dans ton user_dn ?


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#7 2011-07-07 09:18:13

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: [0.80.1] erreur sql ldap_mass_sync.php

Ouep. (Bon je l'ai fait enlevé au client pour plus avoir l''erreur) mais à l'origine oui.

sinon autre erreur concernant ldap_mass_sync.php (en tache cron à 23h30)

30 23 * * * cd /usr/share/glpi/scripts && php -q -f ldap_mass_sync.php -- action=2 server_id=2

06-07-2011 23:30 [@s-rh-glpi]
Notice(8): Undefined index: glpiactiveentities
Backtrace :
/usr/share/glpi/inc/common.function.php:219        userErrorHandlerNormal()
/usr/share/glpi/inc/user.class.php:193        isViewAllEntities()
/usr/share/glpi/inc/commondbtm.class.php:1094        User->pre_deleteItem()
/usr/share/glpi/inc/user.class.php:2430        CommonDBTM->delete()
/usr/share/glpi/inc/authldap.class.php:1614        User::manageDeletedUserInLdap()
/usr/share/glpi/scripts/ldap_mass_sync.php:163        AuthLDAP::ldapImportUserByServerId()
/usr/share/glpi/scripts/ldap_mass_sync.php:118        import()


Xavier Caillaud
Blog GLPI Infotel

Offline

#8 2011-07-07 12:56:49

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: [0.80.1] erreur sql ldap_mass_sync.php

Il manque donc bien un addslashes quelquepart...


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#9 2011-07-08 09:37:17

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: [0.80.1] erreur sql ldap_mass_sync.php

ca devrait régler le premier problème : https://forge.indepnet.net/projects/glp … ions/14869


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#10 2011-07-08 09:45:31

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: [0.80.1] erreur sql ldap_mass_sync.php


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#11 2011-07-08 11:50:06

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: [0.80.1] erreur sql ldap_mass_sync.php

ok merci. Je clos big_smile


Xavier Caillaud
Blog GLPI Infotel

Offline

Board footer

Powered by FluxBB