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-04-05 13:34:10

benodilo
Member
From: Amiens
Registered: 2007-07-31
Posts: 72

Problème synchro OCS/GLPI pour les logiciels

Bonjour,

Nous ne récupérons plus les logiciels dans GLPI.
Pourtant :
-Dans OCS les logiciels sont bien présents
-Les machines se synchronise "correctement"

Première piste dans "Inventaire" => "Logiciel" on avait le message "Unknown column 'glpi_computers_softwareversions.id' in 'field list'". On a modifié la colonne "computers_id" en "id" dans la table glpi_computers_softwareversions.
La liste des logiciels s'affiche à nouveau mais les logiciels ne sont toujours pas présent sur les PC...

Merci pour votre aide !


Version OCS : 1.3.3
Version mass import : 1.4.1
Dictionnaire OCS à non dans GLPI

Informations sur le système, l'installation et la configuration

 
GLPI  0.78.3 (/glpi => /var/www/html/glpi)


Server

 
Operating Systems : Linux portail.crous-amiens.fr 2.6.27.25-78.2.56.fc9.i686 #1 SMP Thu Jun 18 12:47:50 EDT 2009 i686
PHP 5.3.3 (Core, PDO, Phar, Reflection, SPL, SQLite, SimpleXML, apache2handler, apc, bz2, calendar, ctype, curl, date, dom,
    ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, json, ldap, libxml, mbstring, mssql, mysql, mysqli,
    openssl, pcre, pdo_dblib, pdo_mysql, pdo_sqlite, session, shmop, sockets, sqlite3, standard, tokenizer, wddx, xml, xmlreader,
    xmlrpc, xmlwriter, xsl, zip, zlib)
Setup: memory_limit="64M" max_execution_time="30" safe_mode="" session.save_handler="files" post_max_size="8M"
    upload_max_filesize="5M" 
Software: Apache/2.2.9 (Fedora) (Apache/2.2.9 (Fedora) Server at 10.245.64.14 Port 80)
    Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0
MySQL: 5.1.50 (glpi@127.0.0.1/glpi)


Mysql replicate

 
Active : No


Plugins list

 
    massocsimport    Name:Import OCS                     Version :1.4.1      Status :Enabled


LDAP directory

 
Server: 'ldap://10.245.64.1', Port (default=389): '389', Basedn: 'OU=CROUS,DC=crous-amiens,DC=fr', Connection filter:
        '(&(objectClass=user)(objectCategory=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))', rootdn (for non anonymous
        binds): 'CN=compte_apache,CN=Users,DC=crous-amiens,DC=fr', Use TLS: '0'


Notifications / Mail Receiver

 
Use a SMTP server to send emails: SMTP (10.245.64.10)
Mail Receiver
    Name:"Récupération des demandes par mails "   Server:{10.245.64.10/pop/novalidate-cert/notls} Login:"support" Password:Yes
        Active:Yes


OCS Inventory NG

 
Host for the OCSNG database : 'localhost', Connection to OCSNG database successful, Use the OCSNG software dictionary : 0

Offline

#2 2011-04-05 13:44:04

ddurieux
Plugins Dev
From: Propières, France
Registered: 2005-06-17
Posts: 7,521

Re: Problème synchro OCS/GLPI pour les logiciels

Si vous modifiez des champs de la base de données, il ne faut pas s'étonner que les relations avec les PC ne fonctionnent plus

Offline

#3 2011-04-05 13:48:22

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Problème synchro OCS/GLPI pour les logiciels

benodilo wrote:

Première piste dans "Inventaire" => "Logiciel" on avait le message "Unknown column 'glpi_computers_softwareversions.id' in 'field list'". On a modifié la colonne "computers_id" en "id" dans la table glpi_computers_softwareversions.
La liste des logiciels s'affiche à nouveau mais les logiciels ne sont toujours pas présent sur les PC...

Et ils ne risquent pas d'apparaitre étant donné que vous avez renommé le champ de liaison entre les logiciels et les ordinateurs.

En cas d'erreur, ne jamais modifié directement la base mais vous mettre en mode debug et nous transmettre le message exact d'erreur (voir aussi les erreurs sql dans /files/_logs)


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#4 2011-04-05 15:42:50

benodilo
Member
From: Amiens
Registered: 2007-07-31
Posts: 72

Re: Problème synchro OCS/GLPI pour les logiciels

J'aurais pas dû en effet.
Pour ma défense j'ai modifié le nom de la colonne car j'ai des soucis de synchro (et non avant).

J'ai remis le nom initial de la colonne, le message en mode débug :

GLPI MODE DEBUG
SQL REQUEST : 10 Queries took 0.014s
N°     Queries    Time    Errors
1    SELECT *
FROM `glpi_plugins`
WHERE (`directory` = 'massocsimport')    0.000     
2    SHOW COLUMNS
FROM `glpi_softwares`    0.001     
3    SHOW COLUMNS
FROM `glpi_softwares`    0.001     
4    SHOW COLUMNS
FROM `glpi_softwares`    0.001     
5    SELECT *
FROM `glpi_displaypreferences`
WHERE `itemtype` = 'Software' AND `users_id` = '26'
ORDER BY `rank`    0.001     
6    SELECT *
FROM `glpi_displaypreferences`
WHERE `itemtype` = 'Software' AND `users_id` = '0'
ORDER BY `rank`    0.000     
7    SHOW COLUMNS
FROM `glpi_softwares`    0.001     
8    SELECT count(*)
FROM `glpi_softwares`
WHERE `glpi_softwares`.`is_deleted` = '0' AND `glpi_softwares`.`is_template` = '0'     0.008     
9    SET SESSION group_concat_max_len = 9999999;    0.000     
10    SELECT `glpi_softwares`.`entities_id`, `glpi_softwares`.`is_recursive`, `glpi_softwares`.`name` AS ITEM_0, `glpi_softwares`.`id` AS ITEM_0_2, `glpi_entities`.`completename` AS ITEM_1, `glpi_entities`.`id` AS ITEM_1_2, `glpi_manufacturers`.`name` AS ITEM_2, GROUP_CONCAT(DISTINCT `glpi_softwareversions`.`name` SEPARATOR '$$$$') AS ITEM_3, `glpi_operatingsystems`.`name` AS ITEM_4, COUNT(DISTINCT `glpi_computers_softwareversions`.`id`) AS ITEM_5, FLOOR(SUM(`glpi_softwarelicenses`.`number`) * COUNT(DISTINCT `glpi_softwarelicenses`.`id`) / COUNT(`glpi_softwarelicenses`.`id`)) AS ITEM_6, MIN(`glpi_softwarelicenses`.`number`) AS ITEM_6_2, `glpi_softwares`.`id` AS id
FROM `glpi_softwares`
LEFT JOIN `glpi_entities` ON (`glpi_softwares`.`entities_id` = `glpi_entities`.`id`)
LEFT JOIN `glpi_manufacturers` ON (`glpi_softwares`.`manufacturers_id` = `glpi_manufacturers`.`id`)
LEFT JOIN `glpi_softwareversions` ON (`glpi_softwares`.`id` = `glpi_softwareversions`.`softwares_id`)
LEFT JOIN `glpi_operatingsystems` ON (`glpi_softwares`.`operatingsystems_id` = `glpi_operatingsystems`.`id`)
LEFT JOIN `glpi_computers_softwareversions` ON (`glpi_softwareversions`.`id` = `glpi_computers_softwareversions`.`softwareversions_id`)
LEFT JOIN `glpi_softwarelicenses` ON (`glpi_softwares`.`id` = `glpi_softwarelicenses`.`softwares_id` )
WHERE `glpi_softwares`.`is_deleted` = '0' AND `glpi_softwares`.`is_template` = '0' GROUP BY `glpi_softwares`.`id`
ORDER BY ITEM_0 ASC LIMIT 0, 50    0.001    Unknown column 'glpi_computers_softwareversions.id' in 'field list'
AUTOLOAD

Search, Software, CommonDropdown, CommonTreeDropdown, Location, Dropdown, Bookmark, DisplayPreference
POST VARIABLE
KEY    =>    VALUE
itemtype    =>    Software
num    =>    0
field    =>    view
searchtype    =>    contains
value    =>    
meta    =>    0
GET VARIABLE
KEY    =>    VALUE
start    =>    0
order    =>    ASC
is_deleted    =>    0
distinct    =>    N
link    =>    
field    =>    
KEY    =>    VALUE
0    =>    view
contains    =>    
KEY    =>    VALUE
0    =>    
searchtype    =>    
KEY    =>    VALUE
0    =>    contains
link2    =>    
field2    =>    
KEY    =>    VALUE
0    =>    view
contains2    =>    
KEY    =>    VALUE
0    =>    
itemtype2    =>    
searchtype2    =>    
sort    =>    1
SESSION VARIABLE
KEY    =>    VALUE
glpi_plugins    =>    
KEY    =>    VALUE
2    =>    massocsimport
glpicookietest    =>    testcookie
phpCAS    =>    
KEY    =>    VALUE
proxies    =>    
user    =>    s.cordier
glpi_use_mode    =>    2
glpiID    =>    26
glpiname    =>    s.cordier
glpirealname    =>    Cordier
glpifirstname    =>    Steven
glpidefault_entity    =>    0
glpiusers_idisation    =>    1
glpiextauth    =>    1
glpiauthtype    =>    5
glpiroot    =>    /glpi
glpicrontimer    =>    1302010522
glpi_tabs    =>    
KEY    =>    VALUE
central    =>    1
config    =>    5
preference    =>    1
glpidate_format    =>    0
glpidefault_requesttypes_id    =>    1
glpidropdown_chars_limit    =>    50
glpifollowup_private    =>    0
glpitask_private    =>    0
glpiis_categorized_soft_expanded    =>    1
glpiis_ids_visible    =>    0
glpiis_not_categorized_soft_expanded    =>    1
glpilanguage    =>    fr_FR
glpilist_limit    =>    50
glpinumber_format    =>    0
glpipriority_1    =>    #eeffee
glpipriority_2    =>    #aaffaa
glpipriority_3    =>    #aaaaff
glpipriority_4    =>    #ffbfbf
glpipriority_5    =>    #ff5555
glpipriority_6    =>    #ff5555
glpishow_jobs_at_login    =>    0
glpiuse_flat_dropdowntree    =>    0
glpiprofiles    =>    
KEY    =>    VALUE
1    =>    
KEY    =>    VALUE
name    =>    post-only
entities    =>    
KEY    =>    VALUE
0    =>    
KEY    =>    VALUE
id    =>    0
name    =>    
is_recursive    =>    0
1    =>    
KEY    =>    VALUE
id    =>    1
name    =>    Services centraux
is_recursive    =>    0
4    =>    
KEY    =>    VALUE
name    =>    super-admin
entities    =>    
KEY    =>    VALUE
0    =>    
KEY    =>    VALUE
id    =>    0
name    =>    
is_recursive    =>    1
glpiactiveprofile    =>    
KEY    =>    VALUE
id    =>    4
name    =>    super-admin
interface    =>    central
is_default    =>    0
computer    =>    w
monitor    =>    w
software    =>    w
networking    =>    w
printer    =>    w
peripheral    =>    w
cartridge    =>    w
consumable    =>    w
phone    =>    w
notes    =>    w
contact_enterprise    =>    w
document    =>    w
contract    =>    w
infocom    =>    w
knowbase    =>    w
faq    =>    w
reservation_helpdesk    =>    1
reservation_central    =>    w
reports    =>    r
ocsng    =>    w
view_ocsng    =>    r
sync_ocsng    =>    w
dropdown    =>    w
entity_dropdown    =>    w
device    =>    w
typedoc    =>    w
link    =>    w
config    =>    w
rule_ticket    =>    r
entity_rule_ticket    =>    w
rule_ocs    =>    w
rule_ldap    =>    w
rule_softwarecategories    =>    w
search_config    =>    w
search_config_global    =>    w
check_update    =>    r
profile    =>    w
user    =>    w
user_authtype    =>    w
group    =>    w
entity    =>    w
transfer    =>    w
logs    =>    r
reminder_public    =>    w
bookmark_public    =>    w
backup    =>    w
create_ticket    =>    1
delete_ticket    =>    1
add_followups    =>    1
group_add_followups    =>    1
global_add_followups    =>    1
global_add_tasks    =>    1
update_ticket    =>    1
update_priority    =>    1
own_ticket    =>    1
steal_ticket    =>    1
assign_ticket    =>    1
show_all_ticket    =>    1
show_assign_ticket    =>    1
show_full_ticket    =>    1
observe_ticket    =>    1
update_followups    =>    1
update_tasks    =>    1
show_planning    =>    1
show_group_planning    =>    1
show_all_planning    =>    1
statistic    =>    1
password_update    =>    1
helpdesk_hardware    =>    3
helpdesk_item_type    =>    
KEY    =>    VALUE
0    =>    Computer
1    =>    Software
2    =>    Phone
helpdesk_status    =>    
show_group_ticket    =>    0
show_group_hardware    =>    0
rule_dictionnary_software    =>    w
rule_dictionnary_dropdown    =>    w
budget    =>    w
import_externalauth_users    =>    w
notification    =>    w
rule_mailcollector    =>    w
date_mod    =>    
comment    =>    
validate_ticket    =>    1
create_validation    =>    1
entities    =>    
KEY    =>    VALUE
0    =>    
KEY    =>    VALUE
id    =>    0
name    =>    
is_recursive    =>    1
glpiactiveentities    =>    
KEY    =>    VALUE
0    =>    0
2    =>    2
3    =>    3
4    =>    4
6    =>    6
1    =>    1
24    =>    24
25    =>    25
glpisearch    =>    
KEY    =>    VALUE
Software    =>    
KEY    =>    VALUE
start    =>    0
order    =>    ASC
is_deleted    =>    0
distinct    =>    N
link    =>    
field    =>    
KEY    =>    VALUE
0    =>    view
contains    =>    
KEY    =>    VALUE
0    =>    
searchtype    =>    
KEY    =>    VALUE
0    =>    contains
link2    =>    
field2    =>    
KEY    =>    VALUE
0    =>    view
contains2    =>    
KEY    =>    VALUE
0    =>    
itemtype2    =>    
searchtype2    =>    
sort    =>    1
glpisearchcount    =>    
KEY    =>    VALUE
Software    =>    1
glpisearchcount2    =>    
KEY    =>    VALUE
Software    =>    0
glpiactiveentities_string    =>    '0', '2', '3', '4', '6', '1', '24', '25'
glpiparententities    =>    
glpiparententities_string    =>    
glpiactive_entity    =>    0
glpiactive_entity_name    =>    Entité racine (arborescence)
glpiactive_entity_shortname    =>    Entité racine (arborescence)
glpishowallentities    =>    1
glpigroups    =>    
KEY    =>    VALUE
0    =>    69
glpi_currenttime    =>    2011-04-05 15:36:38
MESSAGE_AFTER_REDIRECT    =>    
glpi_multientitiesmode    =>    1
glpimassiveactionselected    =>    
glpicronuserrunning    =>    

Offline

#5 2011-04-05 15:47:06

benodilo
Member
From: Amiens
Registered: 2007-07-31
Posts: 72

Re: Problème synchro OCS/GLPI pour les logiciels

Comme quoi le mode debug peut-être utile !
quand je regarde la liste des logiciels pour un PC j'ai un gros warning rouge !

PHP Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /var/www/html/glpi/inc/dbmysql.class.php at line 206

SQL REQUEST : 94 Queries took 0.018s
N°     Queries    Time    Errors
1    SELECT *
FROM `glpi_plugins`
WHERE (`directory` = 'massocsimport')    0.000     
2    SELECT *
FROM `glpi_computers`
WHERE `id` = '159'    0.000     
3    SELECT *
FROM `glpi_states`
WHERE `id` = '1'    0.000     
4    SHOW COLUMNS
FROM `glpi_states`    0.001     
5    SELECT count(*) AS cpt
FROM glpi_states    0.000     
6    SHOW COLUMNS
FROM `glpi_states`    0.000     
7    SELECT *
FROM `glpi_states`
WHERE 1 AND `glpi_states`.`id` NOT IN ('1')
ORDER BY name     0.000     
8    SELECT *
FROM `glpi_states`
WHERE `id` = '1'    0.000     
9    SELECT *
FROM `glpi_states`
WHERE `id` = '1'    0.000     
10    SELECT *
FROM `glpi_locations`
WHERE `id` = '10'    0.000     
11    SHOW COLUMNS
FROM `glpi_locations`    0.001     
12    SHOW COLUMNS
FROM `glpi_locations`    0.001     
13    SHOW COLUMNS
FROM `glpi_entities`    0.001     
14    SELECT count(*) AS cpt
FROM glpi_locations
WHERE ( `glpi_locations`.`entities_id` = '0' )     0.000     
15    SHOW COLUMNS
FROM `glpi_locations`    0.001     
16    SHOW COLUMNS
FROM `glpi_entities`    0.000     
17    SELECT *
FROM `glpi_locations`
WHERE 1 AND `glpi_locations`.`id` NOT IN ('10') AND ( `glpi_locations`.`entities_id` = '0' )
ORDER BY entities_id, `completename`     0.000     
18    SELECT *
FROM `glpi_locations`
WHERE `id` = '10'    0.000     
19    SELECT *
FROM `glpi_locations`
WHERE `id` = '10'    0.000     
20    SELECT *
FROM `glpi_computertypes`
WHERE `id` = '3'    0.000     
21    SHOW COLUMNS
FROM `glpi_computertypes`    0.000     
22    SELECT count(*) AS cpt
FROM glpi_computertypes    0.000     
23    SHOW COLUMNS
FROM `glpi_computertypes`    0.000     
24    SELECT *
FROM `glpi_computertypes`
WHERE 1 AND `glpi_computertypes`.`id` NOT IN ('3')
ORDER BY name     0.000     
25    SELECT *
FROM `glpi_computertypes`
WHERE `id` = '3'    0.000     
26    SELECT *
FROM `glpi_computertypes`
WHERE `id` = '3'    0.000     
27    SHOW COLUMNS
FROM `glpi_entities`    0.001     
28    SELECT COUNT(DISTINCT `glpi_users`.`id` ) AS cpt
FROM `glpi_users`
LEFT JOIN `glpi_profiles_users` ON (`glpi_users`.`id` = `glpi_profiles_users`.`users_id`)
LEFT JOIN `glpi_profiles` ON (`glpi_profiles`.`id` = `glpi_profiles_users`.`profiles_id`)
WHERE `glpi_profiles`.`interface` = 'central' AND ( `glpi_profiles_users`.`entities_id` = '0' ) AND `glpi_users`.`is_deleted` = '0' AND `glpi_users`.`is_active` = '1'     0.002     
29    SHOW COLUMNS
FROM `glpi_entities`    0.001     
30    SELECT DISTINCT `glpi_users`.*
FROM `glpi_users`
LEFT JOIN `glpi_profiles_users` ON (`glpi_users`.`id` = `glpi_profiles_users`.`users_id`)
LEFT JOIN `glpi_profiles` ON (`glpi_profiles`.`id` = `glpi_profiles_users`.`profiles_id`)
WHERE `glpi_profiles`.`interface` = 'central' AND ( `glpi_profiles_users`.`entities_id` = '0' ) AND `glpi_users`.`is_deleted` = '0' AND `glpi_users`.`is_active` = '1'
ORDER BY `glpi_users`.`realname`, `glpi_users`.`firstname`, `glpi_users`.`name`     0.002     
31    SELECT *
FROM `glpi_manufacturers`
WHERE `id` = '63'    0.000     
32    SHOW COLUMNS
FROM `glpi_manufacturers`    0.000     
33    SELECT count(*) AS cpt
FROM glpi_manufacturers    0.000     
34    SELECT *
FROM `glpi_manufacturers`
WHERE `id` = '63'    0.000     
35    SELECT *
FROM `glpi_computermodels`
WHERE `id` = '13'    0.000     
36    SHOW COLUMNS
FROM `glpi_computermodels`    0.000     
37    SELECT count(*) AS cpt
FROM glpi_computermodels    0.000     
38    SELECT *
FROM `glpi_computermodels`
WHERE `id` = '13'    0.000     
39    SHOW COLUMNS
FROM `glpi_entities`    0.000     
40    SELECT COUNT(DISTINCT `glpi_users`.`id` ) AS cpt
FROM `glpi_users`
LEFT JOIN `glpi_profiles_users` ON (`glpi_users`.`id` = `glpi_profiles_users`.`users_id`)
WHERE `glpi_users`.`id` > '1' AND ( `glpi_profiles_users`.`entities_id` = '0' ) AND `glpi_users`.`is_deleted` = '0' AND `glpi_users`.`is_active` = '1'     0.002     
41    SHOW COLUMNS
FROM `glpi_groups`    0.001     
42    SHOW COLUMNS
FROM `glpi_groups`    0.001     
43    SHOW COLUMNS
FROM `glpi_entities`    0.001     
44    SELECT count(*) AS cpt
FROM glpi_groups
WHERE ( `glpi_groups`.`entities_id` = '0' )     0.000     
45    SHOW COLUMNS
FROM `glpi_groups`    0.001     
46    SHOW COLUMNS
FROM `glpi_entities`    0.000     
47    SELECT *
FROM `glpi_groups`
WHERE 1 AND `glpi_groups`.`id` NOT IN ('0') AND ( `glpi_groups`.`entities_id` = '0' )
ORDER BY `entities_id`, name     0.000     
48    SHOW COLUMNS
FROM `glpi_networks`    0.000     
49    SELECT count(*) AS cpt
FROM glpi_networks    0.000     
50    SHOW COLUMNS
FROM `glpi_networks`    0.000     
51    SELECT *
FROM `glpi_networks`
WHERE 1 AND `glpi_networks`.`id` NOT IN ('0')
ORDER BY name     0.000     
52    SELECT *
FROM `glpi_domains`
WHERE `id` = '3'    0.000     
53    SHOW COLUMNS
FROM `glpi_domains`    0.000     
54    SELECT count(*) AS cpt
FROM glpi_domains    0.000     
55    SHOW COLUMNS
FROM `glpi_domains`    0.000     
56    SELECT *
FROM `glpi_domains`
WHERE 1 AND `glpi_domains`.`id` NOT IN ('3')
ORDER BY name     0.000     
57    SELECT *
FROM `glpi_domains`
WHERE `id` = '3'    0.000     
58    SELECT *
FROM `glpi_domains`
WHERE `id` = '3'    0.000     
59    SELECT *
FROM `glpi_operatingsystems`
WHERE `id` = '8'    0.000     
60    SHOW COLUMNS
FROM `glpi_operatingsystems`    0.000     
61    SELECT count(*) AS cpt
FROM glpi_operatingsystems    0.000     
62    SHOW COLUMNS
FROM `glpi_operatingsystems`    0.000     
63    SELECT *
FROM `glpi_operatingsystems`
WHERE 1 AND `glpi_operatingsystems`.`id` NOT IN ('8')
ORDER BY name     0.000     
64    SELECT *
FROM `glpi_operatingsystems`
WHERE `id` = '8'    0.000     
65    SELECT *
FROM `glpi_operatingsystems`
WHERE `id` = '8'    0.000     
66    SELECT *
FROM `glpi_operatingsystemservicepacks`
WHERE `id` = '5'    0.000     
67    SHOW COLUMNS
FROM `glpi_operatingsystemservicepacks`    0.000     
68    SELECT count(*) AS cpt
FROM glpi_operatingsystemservicepacks    0.000     
69    SHOW COLUMNS
FROM `glpi_operatingsystemservicepacks`    0.000     
70    SELECT *
FROM `glpi_operatingsystemservicepacks`
WHERE 1 AND `glpi_operatingsystemservicepacks`.`id` NOT IN ('5')
ORDER BY name     0.000     
71    SELECT *
FROM `glpi_operatingsystemservicepacks`
WHERE `id` = '5'    0.000     
72    SELECT *
FROM `glpi_operatingsystemservicepacks`
WHERE `id` = '5'    0.000     
73    SELECT *
FROM `glpi_operatingsystemversions`
WHERE `id` = '11'    0.000     
74    SHOW COLUMNS
FROM `glpi_operatingsystemversions`    0.000     
75    SELECT count(*) AS cpt
FROM glpi_operatingsystemversions    0.000     
76    SHOW COLUMNS
FROM `glpi_operatingsystemversions`    0.000     
77    SELECT *
FROM `glpi_operatingsystemversions`
WHERE 1 AND `glpi_operatingsystemversions`.`id` NOT IN ('11')
ORDER BY name     0.000     
78    SELECT *
FROM `glpi_operatingsystemversions`
WHERE `id` = '11'    0.000     
79    SELECT *
FROM `glpi_operatingsystemversions`
WHERE `id` = '11'    0.000     
80    SELECT *
FROM `glpi_ocslinks`
WHERE `computers_id` = '159'    0.000     
81    SELECT `ocsservers_id`
FROM `glpi_ocslinks`
WHERE `glpi_ocslinks`.`computers_id` = '159'    0.000     
82    SELECT `ocsservers_id`
FROM `glpi_ocslinks`
WHERE `glpi_ocslinks`.`computers_id` = '159'    0.000     
83    SELECT *
FROM `glpi_ocsservers`
WHERE `id` = '1'    0.000     
84    SELECT `ocs_agent_version`, `ocsid`
FROM `glpi_ocslinks`
WHERE `computers_id` = '159'    0.000     
85    SELECT `ocsservers_id`
FROM `glpi_ocslinks`
WHERE `glpi_ocslinks`.`computers_id` = '159'    0.000     
86    SELECT *
FROM `glpi_ocsservers`
WHERE `id` = '1'    0.000     
87    SELECT `ocsservers_id`
FROM `glpi_ocslinks`
WHERE `glpi_ocslinks`.`computers_id` = '159'    0.000     
88    SELECT *
FROM `glpi_ocsservers`
WHERE `id` = '1'    0.000     
89    SHOW COLUMNS
FROM `glpi_autoupdatesystems`    0.000     
90    SELECT count(*) AS cpt
FROM glpi_autoupdatesystems    0.000     
91    SHOW COLUMNS
FROM `glpi_autoupdatesystems`    0.000     
92    SELECT *
FROM `glpi_autoupdatesystems`
WHERE 1 AND `glpi_autoupdatesystems`.`id` NOT IN ('0')
ORDER BY name     0.000     
93    SELECT *
FROM `glpi_infocoms`
WHERE `items_id` = '159' AND `itemtype`='Computer'    0.000     
94    SHOW COLUMNS
FROM `glpi_infocoms`    0.001     
AUTOLOAD

Computer, Dropdown, CommonDropdown, CommonTreeDropdown, Entity, State, Location, ComputerType, User, Manufacturer, ComputerModel, Group, Network, Domain, OperatingSystem, OperatingSystemServicePack, OperatingSystemVersion, OcsServer, AutoUpdateSystem, Infocom
POST VARIABLE
KEY    =>    VALUE
searchText    =>    *
value    =>    1
itemtype    =>    State
myname    =>    states_id
limit    =>    50
comment    =>    1
rand    =>    86097551
entity_restrict    =>    -1
update_item    =>    
used    =>    
auto_submit    =>    0
condition    =>    
emptylabel    =>    -----
display_emptychoice    =>    1
GET VARIABLE
KEY    =>    VALUE
id    =>    159
sort    =>    
order    =>    
withtemplate    =>    
SESSION VARIABLE
KEY    =>    VALUE
glpi_plugins    =>    
KEY    =>    VALUE
2    =>    massocsimport
glpicookietest    =>    testcookie
phpCAS    =>    
KEY    =>    VALUE
proxies    =>    
user    =>    s.cordier
glpi_use_mode    =>    2
glpiID    =>    26
glpiname    =>    s.cordier
glpirealname    =>    Cordier
glpifirstname    =>    Steven
glpidefault_entity    =>    0
glpiusers_idisation    =>    1
glpiextauth    =>    1
glpiauthtype    =>    5
glpiroot    =>    /glpi
glpicrontimer    =>    1302011014
glpi_tabs    =>    
KEY    =>    VALUE
central    =>    1
config    =>    5
preference    =>    1
glpidate_format    =>    0
glpidefault_requesttypes_id    =>    1
glpidropdown_chars_limit    =>    50
glpifollowup_private    =>    0
glpitask_private    =>    0
glpiis_categorized_soft_expanded    =>    1
glpiis_ids_visible    =>    0
glpiis_not_categorized_soft_expanded    =>    1
glpilanguage    =>    fr_FR
glpilist_limit    =>    50
glpinumber_format    =>    0
glpipriority_1    =>    #eeffee
glpipriority_2    =>    #aaffaa
glpipriority_3    =>    #aaaaff
glpipriority_4    =>    #ffbfbf
glpipriority_5    =>    #ff5555
glpipriority_6    =>    #ff5555
glpishow_jobs_at_login    =>    0
glpiuse_flat_dropdowntree    =>    0
glpiprofiles    =>    
KEY    =>    VALUE
1    =>    
KEY    =>    VALUE
name    =>    post-only
entities    =>    
KEY    =>    VALUE
0    =>    
KEY    =>    VALUE
id    =>    0
name    =>    
is_recursive    =>    0
1    =>    
KEY    =>    VALUE
id    =>    1
name    =>    Services centraux
is_recursive    =>    0
4    =>    
KEY    =>    VALUE
name    =>    super-admin
entities    =>    
KEY    =>    VALUE
0    =>    
KEY    =>    VALUE
id    =>    0
name    =>    
is_recursive    =>    1
glpiactiveprofile    =>    
KEY    =>    VALUE
id    =>    4
name    =>    super-admin
interface    =>    central
is_default    =>    0
computer    =>    w
monitor    =>    w
software    =>    w
networking    =>    w
printer    =>    w
peripheral    =>    w
cartridge    =>    w
consumable    =>    w
phone    =>    w
notes    =>    w
contact_enterprise    =>    w
document    =>    w
contract    =>    w
infocom    =>    w
knowbase    =>    w
faq    =>    w
reservation_helpdesk    =>    1
reservation_central    =>    w
reports    =>    r
ocsng    =>    w
view_ocsng    =>    r
sync_ocsng    =>    w
dropdown    =>    w
entity_dropdown    =>    w
device    =>    w
typedoc    =>    w
link    =>    w
config    =>    w
rule_ticket    =>    r
entity_rule_ticket    =>    w
rule_ocs    =>    w
rule_ldap    =>    w
rule_softwarecategories    =>    w
search_config    =>    w
search_config_global    =>    w
check_update    =>    r
profile    =>    w
user    =>    w
user_authtype    =>    w
group    =>    w
entity    =>    w
transfer    =>    w
logs    =>    r
reminder_public    =>    w
bookmark_public    =>    w
backup    =>    w
create_ticket    =>    1
delete_ticket    =>    1
add_followups    =>    1
group_add_followups    =>    1
global_add_followups    =>    1
global_add_tasks    =>    1
update_ticket    =>    1
update_priority    =>    1
own_ticket    =>    1
steal_ticket    =>    1
assign_ticket    =>    1
show_all_ticket    =>    1
show_assign_ticket    =>    1
show_full_ticket    =>    1
observe_ticket    =>    1
update_followups    =>    1
update_tasks    =>    1
show_planning    =>    1
show_group_planning    =>    1
show_all_planning    =>    1
statistic    =>    1
password_update    =>    1
helpdesk_hardware    =>    3
helpdesk_item_type    =>    
KEY    =>    VALUE
0    =>    Computer
1    =>    Software
2    =>    Phone
helpdesk_status    =>    
show_group_ticket    =>    0
show_group_hardware    =>    0
rule_dictionnary_software    =>    w
rule_dictionnary_dropdown    =>    w
budget    =>    w
import_externalauth_users    =>    w
notification    =>    w
rule_mailcollector    =>    w
date_mod    =>    
comment    =>    
validate_ticket    =>    1
create_validation    =>    1
entities    =>    
KEY    =>    VALUE
0    =>    
KEY    =>    VALUE
id    =>    0
name    =>    
is_recursive    =>    1
glpiactiveentities    =>    
KEY    =>    VALUE
0    =>    0
2    =>    2
3    =>    3
4    =>    4
6    =>    6
1    =>    1
24    =>    24
25    =>    25
glpisearch    =>    
KEY    =>    VALUE
Software    =>    
KEY    =>    VALUE
start    =>    0
order    =>    ASC
is_deleted    =>    0
distinct    =>    N
link    =>    
field    =>    
KEY    =>    VALUE
0    =>    view
contains    =>    
KEY    =>    VALUE
0    =>    
searchtype    =>    
KEY    =>    VALUE
0    =>    contains
link2    =>    
field2    =>    
KEY    =>    VALUE
0    =>    view
contains2    =>    
KEY    =>    VALUE
0    =>    
itemtype2    =>    
searchtype2    =>    
sort    =>    1
Computer    =>    
KEY    =>    VALUE
start    =>    0
order    =>    ASC
is_deleted    =>    0
distinct    =>    N
link    =>    
field    =>    
KEY    =>    VALUE
0    =>    view
contains    =>    
KEY    =>    VALUE
0    =>    
searchtype    =>    
KEY    =>    VALUE
0    =>    contains
link2    =>    
field2    =>    
KEY    =>    VALUE
0    =>    view
contains2    =>    
KEY    =>    VALUE
0    =>    
itemtype2    =>    
searchtype2    =>    
sort    =>    1
glpisearchcount    =>    
KEY    =>    VALUE
Software    =>    1
Computer    =>    1
glpisearchcount2    =>    
KEY    =>    VALUE
Software    =>    0
Computer    =>    0
glpiactiveentities_string    =>    '0', '2', '3', '4', '6', '1', '24', '25'
glpiparententities    =>    
glpiparententities_string    =>    
glpiactive_entity    =>    0
glpiactive_entity_name    =>    Entité racine (arborescence)
glpiactive_entity_shortname    =>    Entité racine (arborescence)
glpishowallentities    =>    1
glpigroups    =>    
KEY    =>    VALUE
0    =>    69
glpi_currenttime    =>    2011-04-05 15:43:39
MESSAGE_AFTER_REDIRECT    =>    
glpi_multientitiesmode    =>    1
glpimassiveactionselected    =>    
glpicronuserrunning    =>    
glpilisttitle    =>    
KEY    =>    VALUE
Computer    =>    Liste
glpilistitems    =>    
KEY    =>    VALUE
Computer    =>    
KEY    =>    VALUE
0    =>    159
1    =>    384
2    =>    143
3    =>    241
4    =>    47
5    =>    254
6    =>    224
7    =>    406
8    =>    441
9    =>    443
10    =>    320
11    =>    293
12    =>    442
13    =>    439
14    =>    437
15    =>    440
16    =>    292
17    =>    291
18    =>    418
19    =>    350
20    =>    290
21    =>    289
22    =>    104
23    =>    411
24    =>    408
25    =>    413
26    =>    412
27    =>    414
28    =>    415
29    =>    410
30    =>    223
31    =>    158
32    =>    250
33    =>    155
34    =>    188
35    =>    358
36    =>    187
37    =>    248
38    =>    345
39    =>    398
40    =>    369
41    =>    296
42    =>    128
43    =>    404
44    =>    446
45    =>    287
46    =>    286
47    =>    285
48    =>    177
49    =>    179
glpilisturl    =>    
KEY    =>    VALUE
Computer    =>    /glpi/front/computer.php

Offline

#6 2011-04-05 16:24:35

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Problème synchro OCS/GLPI pour les logiciels

Il nous faudrait l'erreur qui est généré dans le fichier glpi/files/_logs/sql-error.log


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#7 2011-04-06 00:36:30

benodilo
Member
From: Amiens
Registered: 2007-07-31
Posts: 72

Re: Problème synchro OCS/GLPI pour les logiciels

J'ai ça :

2011-04-05 15:20 [26@portail.crous-amiens.fr]
*** MySQL query error :
***
SQL: SELECT `glpi_softwares`.`entities_id`, `glpi_softwares`.`is_recursive`, `glpi_softwares`.`name` AS ITEM_0,
                        `glpi_softwares`.`id` AS ITEM_0_2, `glpi_entities`.`completename` AS ITEM_1,
                     `glpi_entities`.`id` AS ITEM_1_2, `glpi_manufacturers`.`name` AS ITEM_2,  GROUP_CONCAT(DISTINCT `glpi_softwareversions`.`name` SEPARATOR \'$$$$\') AS ITEM_3, `glpi_operatingsystems`.`name` AS ITEM_4,  COUNT(DISTINCT `glpi_computers_softwareversions`.`id`)
                        AS ITEM_5,  FLOOR(SUM(`glpi_softwarelicenses`.`number`)
                           * COUNT(DISTINCT `glpi_softwarelicenses`.`id`)
                           / COUNT(`glpi_softwarelicenses`.`id`)) AS ITEM_6,
                     MIN(`glpi_softwarelicenses`.`number`) AS ITEM_6_2, `glpi_softwares`.`id` AS id  FROM `glpi_softwares` LEFT JOIN `glpi_entities`  ON (`glpi_softwares`.`entities_id` = `glpi_entities`.`id`)  LEFT JOIN `glpi_manufacturers`  ON (`glpi_softwares`.`manufacturers_id` = `glpi_manufacturers`.`id`)  LEFT JOIN `glpi_softwareversions`  ON (`glpi_softwares`.`id` = `glpi_softwareversions`.`softwares_id`)  LEFT JOIN `glpi_operatingsystems`  ON (`glpi_softwares`.`operatingsystems_id` = `glpi_operatingsystems`.`id`)
                   LEFT JOIN `glpi_computers_softwareversions`
                     ON (`glpi_softwareversions`.`id` = `glpi_computers_softwareversions`.`softwareversions_id`)  LEFT JOIN `glpi_softwarelicenses`
                           ON (`glpi_softwares`.`id` = `glpi_softwarelicenses`.`softwares_id` )  WHERE  `glpi_softwares`.`is_deleted` = \'0\'  AND `glpi_softwares`.`is_template` = \'0\'  GROUP BY `glpi_softwares`.`id` ORDER BY ITEM_0 ASC  LIMIT 0, 50
Error: Unknown column 'glpi_computers_softwareversions.id' in 'field list'
Backtrace :
/var/www/html/glpi/inc/search.class.php :670               DBmysql->query()
/var/www/html/glpi/inc/search.class.php :48                Search::showList()
/var/www/html/glpi/front/software.php :44          Search::show()
/var/www/html/glpi/front/software.php

Offline

#8 2011-04-09 10:27:42

benodilo
Member
From: Amiens
Registered: 2007-07-31
Posts: 72

Re: Problème synchro OCS/GLPI pour les logiciels

Donc il ne trouve pas cette fameuse colonne id puisqu'elle s’appelle computers_id

Est-ce le code qui n'est pas à jour ou la BDD ?

Ça nous manque cruellement on a plus les infos sur les logicielles installés sur les PC....
Je vais faire la maj en 0.78.4 des fois que ça corrige...

Offline

#9 2011-04-11 10:14:32

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Problème synchro OCS/GLPI pour les logiciels

Normalement, dans la table `glpi_computers_softwareversions` vous avez bien un champ `id`, c'est même la clé primaire


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#10 2011-04-27 13:45:36

benodilo
Member
From: Amiens
Registered: 2007-07-31
Posts: 72

Re: Problème synchro OCS/GLPI pour les logiciels

Désolé de répondre aussi tardivement je n'avais pas vu votre réponse, j'ai installé une base vierge et j'ai vu qu'il y avait une colonne ID. Je suis venu sur le post justement pour indiqué que j'ai réglé le problème, voici la procédure :
-Ajout de la colonne ID en indiquant que c'est une clef primaire
-On vide la table avec un TRUNCATE
-On relance massimport

Bingo ..!

Je pense qu'une mise à jour à casser cette table, c'est la seule explication que j'ai "trouvé".

Merci pour votre aide je peux à nouveau utiliser sereinement mon outil préféré ! wink

Offline

#11 2011-04-27 13:53:39

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Problème synchro OCS/GLPI pour les logiciels

Cool. Je ferme


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

Board footer

Powered by FluxBB