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 2013-09-30 23:58:52

jujunea
Member
Registered: 2008-08-21
Posts: 83

[RESOLU] [shellcommands] Fatal error: Class '1' not found

Bonjour,

il est impossible de rajouter des commandes, il y a une erreur (mode debug) :

Fatal error: Class '1' not found in C:\xampp\htdocs\glpi\plugins\shellcommands\hook.php on line 167

538082GLPIshellcommands.jpg

 
GLPI  0.84.2 (/glpi => C:/xampp/htdocs/glpi)

Server
 
Operating system: Windows NT EPIGLPI1 5.2 build 3790 (Windows Server 2003 R2 Standard Edition Service Pack 2) i586
PHP 5.3.8 apache2handler (Core, PDO, PDO_ODBC, Phar, Reflection, SPL, SQLite, SimpleXML, apache2handler, bcmath, bz2, calendar,
    com_dotnet, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, json, ldap, libxml,
    mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, odbc, openssl, pcre, pdo_mysql, pdo_sqlite, session, soap, sockets, sqlite3,
    standard, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, zip, zlib)
Setup: max_execution_time="-1" memory_limit="128M" post_max_size="500M" safe_mode="" session.save_handler="files"
    upload_max_filesize="500M" 
Software: Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 (Apache/2.2.21 (Win32)
    mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 Server at epiglpi1 Port 80)
    Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.66 Safari/537.36
DBMS:    Server Software: MySQL Community Server (GPL)
    Server Version: 5.5.16
    Parameters: root@localhost/glpi
    Host info: localhost via TCP/IP
    
C:\xampp\htdocs\glpi/config : OK
C:\xampp\htdocs\glpi/files : OK
C:\xampp\htdocs\glpi/files/_dumps : OK
C:\xampp\htdocs\glpi/files/_sessions : OK
C:\xampp\htdocs\glpi/files/_cron : OK
C:\xampp\htdocs\glpi/files/_cache/ : OK
C:\xampp\htdocs\glpi/files/_graphs : OK
C:\xampp\htdocs\glpi/files/_lock : OK
C:\xampp\htdocs\glpi/files/_plugins : OK
C:\xampp\htdocs\glpi/files/_tmp : OK
C:\xampp\htdocs\glpi/files/_rss : OK
C:\xampp\htdocs\glpi/files/_uploads : OK
C:\xampp\htdocs\glpi/files/_log : OK

archires             Name: Architectures réseau           Version: 2.1.0      State: Enabled
positions            Name: Cartographie                   Version: 4.0.0      State: Enabled
shellcommands        Name: Commandes Shell                Version: 1.6.0      State: Enabled
behaviors            Name: Comportements                  Version: 0.84       State: Enabled
accounts             Name: Comptes                        Version: 1.9.0      State: Enabled
domains              Name: Domaines                       Version: 1.6.0      State: Enabled
fusioninventory      Name: FusionInventory                Version: 0.84+1.2   State: Enabled
racks                Name: Gestion de baies               Version: 1.4.0      State: Enabled
manufacturersimports Name: Imports fabricants             Version: 1.6.0      State: Enabled
pdf                  Name: Impression pdf                 Version: 0.83.3     State: To be cleaned
ocsinventoryng       Name: OCS Inventory NG               Version: 1.0.2      State: Enabled
helpdeskrating       Name: Plugin Helpdeskrating          Version: 1.1.0      State: Enabled
projet               Name: Projets                        Version: 1.4.0      State: Enabled
reports              Name: Rapports                       Version: 1.7.0      State: Enabled
themes               Name: Thèmes                         Version: 1.1.3      State: To be cleaned

Merci d'avance.

Last edited by jujunea (2013-10-15 23:15:50)


Prod === Glpi : 10.0.10
Prod === PHP 8.1.2
Prod === Ubuntu 22.04

Offline

#2 2013-10-14 18:04:58

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

Re: [RESOLU] [shellcommands] Fatal error: Class '1' not found

Si tu exécute cette requête sur phpmyadmin ou en shell ?

SELECT DISTINCT `itemtype`
                             FROM `glpi_plugin_shellcommands_shellcommands_items`
GROUP BY `itemtype`

Quel résultat as-tu ?


Xavier Caillaud
Blog GLPI Infotel

Offline

#3 2013-10-14 23:23:54

jujunea
Member
Registered: 2008-08-21
Posts: 83

Re: [RESOLU] [shellcommands] Fatal error: Class '1' not found

08:21:22    SELECT DISTINCT `itemtype`                              FROM `glpi_plugin_shellcommands_shellcommands_items` GROUP BY `itemtype` LIMIT 0, 1000    2 row(s) returned    0.000 sec / 0.000 sec

itemtype
1
Computer


Prod === Glpi : 10.0.10
Prod === PHP 8.1.2
Prod === Ubuntu 22.04

Offline

#4 2013-10-14 23:29:53

jujunea
Member
Registered: 2008-08-21
Posts: 83

Re: [RESOLU] [shellcommands] Fatal error: Class '1' not found

Si je fais ça : 08:25:31    SELECT * FROM glpi.glpi_plugin_shellcommands_shellcommands_items LIMIT 0, 1000    8 row(s) returned    0.000 sec / 0.000 sec

id,plugin_shellcommands_shellcommands_id,itemtype
1,4,1
2,1,1
3,2,1
4,3,1
5,4,Computer
6,5,Computer
7,6,Computer
8,7,Computer

je vois 8 lignes qui correspondent aux différents test d'ajout de commande (ping,noslookup) que j'ai fais mais dans glpi je n'en vois qu'une seule (qui ne marche pas de plus)


Prod === Glpi : 10.0.10
Prod === PHP 8.1.2
Prod === Ubuntu 22.04

Offline

#5 2013-10-15 09:09:08

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

Re: [RESOLU] [shellcommands] Fatal error: Class '1' not found

Bizarre. il faudrait que tu remplaces les 1 par Computer (normalement c'est fait par l'upgrade)


Xavier Caillaud
Blog GLPI Infotel

Offline

#6 2013-10-15 23:15:02

jujunea
Member
Registered: 2008-08-21
Posts: 83

Re: [RESOLU] [shellcommands] Fatal error: Class '1' not found

Ok j'ai remplacé les "1" par des "COMPUTER" mais ça n'a rien donné, mais j'ai pu supprimé dans GLPI toutes mes lignes qui sont alors apparues.

Apres avoir recréé mes commandes tout fonctionne correctement.

Merci !


Prod === Glpi : 10.0.10
Prod === PHP 8.1.2
Prod === Ubuntu 22.04

Offline

#7 2013-10-16 09:15:01

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

Re: [RESOLU] [shellcommands] Fatal error: Class '1' not found

De rien.


Xavier Caillaud
Blog GLPI Infotel

Offline

Board footer

Powered by FluxBB