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 2017-04-27 14:04:40

Motok
Member
Registered: 2016-09-08
Posts: 10

[Résolu] Erreur d'import de nouveaux ordinateurs.

Bonjour,

Après mise à jour de GLPI et du plugin OCS vers la dernière version, impossible d'importer de nouveaux ordinateurs :

Message d'erreur : Fatal error: Call to a member function fetch_assoc() on boolean in /var/www/glpi/inc/dbmysql.class.php on line 308

Le fichier sql-errors.log :

017-04-27 13:46:40 [6@s10peda]
  *** MySQL query error:
  SQL: SELECT * FROM `glpi_plugin_ocsinventoryng_ocsservers` WHERE `HARDWARE_ID` = 1630
  Error: Unknown column 'HARDWARE_ID' in 'where clause'
  Backtrace :
  ...ns/ocsinventoryng/inc/ocsdbclient.class.php:134
  plugins/ocsinventoryng/inc/ocsclient.class.php:280 PluginOcsinventoryngOcsDbClient->getComputerRule()
  plugins/ocsinventoryng/hook.php:1785               PluginOcsinventoryngOcsClient->getOcsComputer()
  :                                                  plugin_ocsinventoryng_ruleCollectionPrepareInputDataForProcess()
  inc/plugin.class.php:1196                          call_user_func()
  inc/rulecollection.class.php:1622                  Plugin::doOneHook()
  inc/rulecollection.class.php:1448                  RuleCollection->prepareInputDataForProcessWithPlugins()
  ...ins/ocsinventoryng/inc/ocsserver.class.php:2552 RuleCollection->processAllRules()
  ...ins/ocsinventoryng/inc/ocsserver.class.php:2072 PluginOcsinventoryngOcsServer::importComputer()
  plugins/ocsinventoryng/front/ocsng.import.php:73   PluginOcsinventoryngOcsServer::processComputer()

La synchronisation d'ordinateurs déjà importés fonctionne.
Version de GLPI : 9.1.2
Version du plugin OCS : 1.3.3
Serveur debian : 8.7

Last edited by Motok (2017-05-02 15:40:41)

Offline

#2 2017-05-02 15:40:09

Motok
Member
Registered: 2016-09-08
Posts: 10

Re: [Résolu] Erreur d'import de nouveaux ordinateurs.

Solution trouvée içi : https://github.com/pluginsGLPI/ocsinventoryng/issues/75

Dans le fichier ocsdbclient.class.php à la ligne 134, il faut changer cette ligne :

 if (self::OcsTableExists($table)) {

Par celle-ci :

if (self::OcsTableExists($table) && $table != "glpi_plugin_ocsinventoryng_ocsservers") {

Le problème ne semble survenir que si la base de donnée GLPI est commune à la base OCS.

Offline

Board footer

Powered by FluxBB