You are not logged in.


 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 2019-02-23 05:00:03

Registered: 2014-04-13
Posts: 117

9.4 network ports error (fatal php error)

PHP Fatal error:
Uncaught Error: Call to undefined function getID() in /usr/share/glpi/inc/networkportinstantiation.class.php:289\n
Stack trace:\n
#0/usr/share/glpi/inc/networkportethernet.class.php(162): NetworkPortInstantiation->getInstantiationHTMLTable(Object(NetworkPort),
Object(HTMLTableRow), Object(HTMLTableCell), Array)\n
#1 /usr/share/glpi/inc/networkportinstantiation.class.php(253):
NetworkPortEthernet->getPeerInstantiationHTMLTable(Object(NetworkPort), Object(HTMLTableRow), Object(HTMLTableCell), Array)\n
#2 /usr/share/glpi/inc/networkportethernet.class.php(174): NetworkPortInstantiation->getInstantiationHTMLTableWithPeer(Object(NetworkPort),
Object(HTMLTableRow), NULL, Array)\n
#3 /usr/share/glpi/inc/networkport.class.php(776):NetworkPortEthernet -> getInstantiationHTMLTable(Object(NetworkPort),Object(HTMLTableRow), NULL, Array)\n
#4 /usr/share/glpi/plugins/fusioninventory/inc/networkequipment.class.php(189): NetworkPort::showForItem(Object(NetworkEquipment))\n
#5 /usr/share/glpi/plugins/fusioninventory/inc/ in /usr/share/glpi/inc/networkportinstantiation.class.php on line 289, referer: … php?id=909

It was doing this immediately after updating - before I enabled any plugins - and is still doing it.

GLPI 9.4.1 (/glpi => /usr/share/glpi)
Installation mode: RPM

Operating system: Linux 2.6.32-754.10.1.el6.x86_64 #1 SMP Thu Nov 29 15:44:01 EST 2018 x86_64
PHP 7.3.2 apache2handler (Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, apc, apcu, bcmath, bz2,
	calendar, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, intl, json, ldap, libxml,
	mbstring, mysqli, mysqlnd, openssl, pcre, pdo_mysql, pdo_sqlite, posix, rrd, session, shmop, snmp, soap, sockets, sqlite3,
	standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib)
Setup: max_execution_time="30" memory_limit="256M" post_max_size="8M" safe_mode="" session.save_handler="files"
Software: Apache/2.2.15 (Red Hat) (Apache/2.2.15 (Red Hat) Server at Port 443)
	Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36
Server Software: MariaDB Server
	Server Version: 10.3.13-MariaDB
	Server SQL Mode: 
	Parameters: glpi@localhost/datatrieve
	Host info: Localhost via UNIX socket
mysqli extension is installed
ctype extension is installed
fileinfo extension is installed
json extension is installed
mbstring extension is installed
iconv extension is installed
zlib extension is installed
curl extension is installed
gd extension is installed
simplexml extension is installed
xml extension is installed
ldap extension is installed
imap extension is installed
Zend OPcache extension is installed
APCu extension is installed
xmlrpc extension is installed
CAS extension is installed
Database version seems correct (10.3.13) - Perfect!
/var/log/glpi : OK
/etc/glpi : OK
/var/lib/glpi/files : OK
/var/lib/glpi/files/_dumps : OK
/var/lib/glpi/files/_sessions : OK
/var/lib/glpi/files/_cron : OK
/var/lib/glpi/files/_graphs : OK
/var/lib/glpi/files/_lock : OK
/var/lib/glpi/files/_plugins : OK
/var/lib/glpi/files/_tmp : OK
/var/lib/glpi/files/_cache : OK
/var/lib/glpi/files/_rss : OK
/var/lib/glpi/files/_uploads : OK
/var/lib/glpi/files/_pictures : OK
SELinux mode is Unknown
SELinux boolean configuration for httpd_can_network_connect --> unkwown (Some features may require this to be on)
SELinux boolean configuration for httpd_can_network_connect_db --> unkwown (Some features may require this to be on)
SELinux boolean configuration for httpd_can_sendmail --> unkwown (Some features may require this to be on)

htmLawed version 1.2.4 in (/usr/share/php/htmLawed)
phpmailer/phpmailer version 6.0.7 in (/usr/share/php/PHPMailer/PHPMailer6)
simplepie/simplepie version 1.5.2 in (/usr/share/php/php-simplepie)
tecnickcom/tcpdf version 6.2.26 in (/usr/share/php/tcpdf)
michelf/php-markdown in (/usr/share/php/Michelf)
true/punycode in (/usr/share/php/TrueBV)
iamcal/lib_autolink in (/usr/share/php/php-iamcal-lib-autolink)
sabre/vobject in (/usr/share/php/Sabre/VObject4)
zendframework/zend-cache in (/usr/share/php/Zend/Cache)
zendframework/zend-i18n in (/usr/share/php/Zend/I18n)
zendframework/zend-serializer in (/usr/share/php/Zend/Serializer)
monolog/monolog in (/usr/share/php/Monolog)
sebastian/diff in (/usr/share/php/SebastianBergmann/Diff)
elvanto/litemoji in (/usr/share/php/LitEmoji)
symfony/console in (/usr/share/php/Symfony3/Component/Console)
leafo/scssphp in (/usr/share/php/Leafo/ScssPhp)
phpCas version 1.3.6 in (/usr/share/pear)

LDAP directories
Server: 'ldap://', Port: '389', BaseDN: 'ou=People,ou=Accounts,dc=mssl,dc=ucl,dc=ac,dc=uk', Connection
		filter: none, RootDN: 'uid=msslyz$,ou=Machines,ou=Accounts,dc=mssl,dc=ucl,dc=ac,dc=uk', Use TLS: '1'

SQL replicas
Not active

Way of sending emails: SMTP (anonymous@

Mails receivers

Plugins list
	accounts             Name: Accounts                       Version: 2.5.0      State: Enabled
	fields               Name: Additionnal fields             Version: 1.9.1      State: Enabled
	news                 Name: Alerts                         Version: 1.5.1      State: Enabled
	badges               Name: Badges                         Version: 2.5.0      State: Enabled
	barcode              Name: Barcode                        Version: 2.4.0      State: Enabled
	behaviors            Name: Behaviours                     Version: 2.1.1      State: Not activated
	positions            Name: Cartography                    Version: 4.6.0      State: Enabled
	connections          Name: Connections                    Version: 9.3        State: Enabled
	consumables          Name: Consumable request             Version: 1.5.0      State: Enabled
	custom               Name: Custom                         Version: 0.90-1.0.1 State: Enabled
	dashboard            Name: Dashboard                      Version: 0.9.5      State: Enabled
	mydashboard          Name: Dashboard access               Version: 1.7.0      State: Enabled
	databases            Name: Databases                      Version: 2.3.0      State: Enabled
	domains              Name: Domains                        Version: 2.1.0      State: Enabled
	manageentities       Name: Entities portal                Version: 4.0.0      State: Enabled
	environment          Name: Environment                    Version: 2.3.0      State: Enabled
	escalade             Name: Escalation                     Version: 2.4.1      State: Enabled
	datainjection        Name: File injection                 Version: 2.7.0      State: Enabled
	financialreports     Name: Financial reports              Version: 2.6.0      State: Enabled
	formvalidation       Name: Form Validation                Version: 0.2.3      State: Enabled
	formcreator          Name: Forms                          Version: 2.7.0      State: Enabled
	fusioninventory      Name: FusionInventory                Version: 9.4.0+1.0  State: Enabled
	resources            Name: Human Resources                Version: 2.6.0      State: Enabled
	geninventorynumber   Name: Inventory number generation    Version: 2.4.0      State: Enabled
	addressing           Name: IP Adressing                   Version: 2.8.0      State: Enabled
	uninstall            Name: Item's Lifecycle (uninstall)   Version: 2.6.0      State: Enabled
	itilcategorygroups   Name: ItilCategory Groups            Version: 2.2.0      State: Enabled
	mailanalyzer         Name: Mail Analyzer                  Version: 1.3.8      State: Enabled
	mask                 Name: Mask                           Version: 2.2.0      State: Enabled
	metademands          Name: Meta-Demands                   Version: 2.6.0      State: Enabled
	mreporting           Name: More Reporting                 Version: 1.6.1      State: Enabled
	moreticket           Name: More ticket                    Version: 1.5.0      State: Enabled
	nebackup             Name: nebackup                       Version: 2.2.2      State: Enabled
	archires             Name: Network Architectures          Version: 2.6.0      State: Not activated
	notifications        Name: Notifications                  Version: 9.3+1.0    State: Enabled
	genericobject        Name: Objects management             Version: 2.7.0      State: Enabled
	order                Name: Orders management              Version: 2.4.0      State: Enabled
	additionalalerts     Name: Others alerts                  Version: 2.2.0      State: Enabled
	pdf                  Name: Print to pdf                   Version: 1.4.0      State: Not activated
	printercounters      Name: Printer counters               Version: 1.6.0      State: Enabled
	reports              Name: Reports                        Version: 1.12.0     State: Not activated
	reservation          Name: Reservation                    Version: 2.1.1      State: Enabled
	room                 Name: Room Management                Version: 3.1.1      State: To be cleaned
	seasonality          Name: Seasonalities                  Version: 1.5.0      State: Enabled
	shellcommands        Name: Shell Commands                 Version: 2.3.0      State: Enabled
	showloading          Name: Show Loading                   Version: 1.0.0      State: Enabled
	statecheck           Name: Statecheck Rules               Version: 2.0.12     State: To be cleaned
	geststock            Name: Stock gestion                  Version: 1.2.0      State: Not activated
	manufacturersimports Name: Suppliers imports              Version: 2.2.0      State: Enabled
	taskdrop             Name: TaskDrop                       Version: 1.1.0      State: Enabled
	tasklists            Name: Tasks list                     Version: 1.5.0      State: Enabled
	ticketcleaner        Name: Ticket Cleaner                 Version: 2.1.0      State: Enabled
	timelineticket       Name: Timeline of tickets            Version: 9.4+1.0    State: Enabled
	typology             Name: Typologies                     Version: 2.5.1      State: To be cleaned
	useditemsexport      Name: Used items export              Version: 2.2.0      State: Enabled
	webapplications      Name: Web applications               Version: 2.6.0      State: Enabled
	webservices          Name: Web Services                   Version: 1.9.0      State: Not activated

httpd_can_network_connect_db   (on   ,   on)  Allow HTTPD scripts and modules to connect to databases over the network.
httpd_can_network_connect      (on   ,   on)  Allow HTTPD scripts and modules to connect to the network using TCP.
httpd_can_sendmail             (on   ,   on)  Allow http daemon to send mail


#2 2019-02-23 05:10:06

Registered: 2014-04-13
Posts: 117

Re: 9.4 network ports error (fatal php error)

found it exactly where pointed to - and verified from Github source


line 289
                  'WHERE'  => ['networkports_id_list' => ['LIKE', '%"'.$netport-getID().'"%']]


                  'WHERE'  => ['networkports_id_list' => ['LIKE', '%"'.$netport->getID().'"%']]

It's a silly typo - and I'm really surprised this wasn't found in testing.


#3 2019-02-25 13:08:39

From: Sillery (51)
Registered: 2008-01-14
Posts: 14,843

Re: 9.4 network ports error (fatal php error)

CentOS 6.5 - CentOS 7
PHP 5.6 - PHP 7 - MySQL 5.6  + APC + oOPcache
GLPI from 0.72 to dev version


Board footer

Powered by FluxBB