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 2023-07-07 15:55:06

tomHbarre
Member
From: Normandie
Registered: 2021-01-08
Posts: 6

[SOLVED] Inventory fills php-errors.log with 'SQL Server' warnings

Hi folks !

When native inventory is enabled, php-errors.log grows fast !
The error happens 789 times in less than a minute and it's not regular, it happens every 4 to 7 minutes approx.
The regex can be either :

- `SQL Server (.*) DMF`
- `Microsoft SQL Server (.*) Setup (.*)`
Here's the error :

[2023-07-07 13:07:54] glpiphplog.WARNING:   *** PHP User Warning (512): Invalid regular expression `SQL Server (.*) DMF`. in /var/www/glpi/src/RuleCriteria.php at line 497
  Backtrace :
  src/RuleCriteria.php:497                           trigger_error()
  src/Rule.php:1716                                  RuleCriteria::match()
  src/Rule.php:1654                                  Rule->checkCriteria()
  src/Rule.php:1522                                  Rule->checkCriterias()
  src/RuleCollection.php:1640                        Rule->process()
  src/Inventory/Asset/Software.php:132               RuleCollection->processAllRules()
  src/Inventory/Inventory.php:687                    Glpi\Inventory\Asset\Software->prepare()
  src/Inventory/Inventory.php:339                    Glpi\Inventory\Inventory->processInventoryData()
  src/Inventory/Request.php:360                      Glpi\Inventory\Inventory->doInventory()
  src/Inventory/Request.php:90                       Glpi\Inventory\Request->inventory()
  src/Agent/Communication/AbstractRequest.php:359    Glpi\Inventory\Request->handleAction()
  src/Agent/Communication/AbstractRequest.php:271    Glpi\Agent\Communication\AbstractRequest->handleJSONRequest()
  front/inventory.php:92                             Glpi\Agent\Communication\AbstractRequest->handleRequest()
  public/index.php:82                                require()

And here the details of the conf.

<details><summary>Informations sur le système, l'installation et la configuration</summary><pre>GLPI 10.0.8 (/glpi => /var/www/glpi)
Installation mode: TARBALL
Current language:fr_FR

</pre></details><details><summary>Server</summary><pre> 
Operating system: Linux GLPI 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64
PHP 8.2.7 apache2handler (Core, FFI, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, apcu, bz2, calendar,
	ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mysqli,
	mysqlnd, openssl, pcre, pdo_mysql, posix, random, readline, session, shmop, soap, sockets, sodium, standard, sysvmsg, sysvsem,
	sysvshm, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib)
Setup: max_execution_time="30" memory_limit="128M" post_max_size="8M" safe_mode="" session.save_handler="files"
	upload_max_filesize="2M" 
Software: Apache/2.4.56 (Debian) (Apache/2.4.56 (Debian) Server at glpi.mydomain.local Port 443
)
	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0
Server Software: Debian 11
	Server Version: 10.5.19-MariaDB-0+deb11u2
	Server SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
	Parameters: glpibdd@localhost/glpi
	Host info: Localhost via UNIX socket
	
PHP version (8.2.7) is supported.
Sessions configuration is OK.
Allocated memory is sufficient.
mysqli extension is installed.
Following extensions are installed: dom, fileinfo, filter, libxml, json, simplexml, xmlreader, xmlwriter.
curl extension is installed.
gd extension is installed.
intl extension is installed.
zlib extension is installed.
The constant SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.
Database engine version (10.5.19) is supported.
No files from previous GLPI version detected.
The log file has been created successfully.
Write access to /usr/share/glpi/temp/_cache has been validated.
Write access to /usr/share/glpi/config has been validated.
Write access to /usr/share/glpi/temp/_cron has been validated.
Write access to /usr/share/glpi/files has been validated.
Write access to /usr/share/glpi/temp/_dumps has been validated.
Write access to /usr/share/glpi/temp/_graphs has been validated.
Write access to /usr/share/glpi/temp/_lock has been validated.
Write access to /usr/share/glpi/temp/_pictures has been validated.
Write access to /usr/share/glpi/temp/_plugins has been validated.
Write access to /usr/share/glpi/temp/_rss has been validated.
Write access to /usr/share/glpi/temp/_sessions has been validated.
Write access to /usr/share/glpi/temp/_tmp has been validated.
Write access to /usr/share/glpi/temp/_uploads has been validated.

Web server root directory configuration seems safe.
Sessions configuration is secured.
OS and PHP are relying on 64 bits integers.
exif extension is installed.
ldap extension is installed.
openssl extension is installed.
Following extensions are installed: bz2, Phar, zip.
Zend OPcache extension is installed.
Following extensions are installed: ctype, iconv, mbstring, sodium.
Write access to /var/www/glpi/marketplace has been validated.
Timezones seems loaded in database.

</pre></details><details><summary>GLPI constants</summary><pre> 
GLPI_ROOT: "/var/www/glpi"
GLPI_CONFIG_DIR: "/usr/share/glpi/config"
GLPI_VAR_DIR: "/usr/share/glpi/files"
GLPI_SYS_DIR: "/usr/share/glpi/temp"
GLPI_DOC_DIR: "/usr/share/glpi/files"
GLPI_CRON_DIR: "/usr/share/glpi/temp/_cron"
GLPI_DUMP_DIR: "/usr/share/glpi/temp/_dumps"
GLPI_GRAPH_DIR: "/usr/share/glpi/temp/_graphs"
GLPI_LOCK_DIR: "/usr/share/glpi/temp/_lock"
GLPI_PICTURE_DIR: "/usr/share/glpi/temp/_pictures"
GLPI_PLUGIN_DOC_DIR: "/usr/share/glpi/temp/_plugins"
GLPI_RSS_DIR: "/usr/share/glpi/temp/_rss"
GLPI_SESSION_DIR: "/usr/share/glpi/temp/_sessions"
GLPI_TMP_DIR: "/usr/share/glpi/temp/_tmp"
GLPI_UPLOAD_DIR: "/usr/share/glpi/temp/_uploads"
GLPI_CACHE_DIR: "/usr/share/glpi/temp/_cache"
GLPI_INVENTORY_DIR: "/usr/share/glpi/temp/_inventories"
GLPI_LOCAL_I18N_DIR: "/usr/share/glpi/temp/_locales"
GLPI_LOG_DIR: "/var/log/glpi"
GLPI_MARKETPLACE_DIR: "/var/www/glpi/marketplace"
GLPI_USE_CSRF_CHECK: "1"
GLPI_CSRF_EXPIRES: "7200"
GLPI_CSRF_MAX_TOKENS: "100"
GLPI_USE_IDOR_CHECK: "1"
GLPI_IDOR_EXPIRES: "7200"
GLPI_ALLOW_IFRAME_IN_RICH_TEXT: false
GLPI_SERVERSIDE_URL_ALLOWLIST: ["/^(https?|feed):\\/\\/[^@:]+(\\/.*)?$/"]
GLPI_TELEMETRY_URI: "https://telemetry.glpi-project.org"
GLPI_INSTALL_MODE: "TARBALL"
GLPI_NETWORK_MAIL: "glpi@teclib.com"
GLPI_NETWORK_SERVICES: "https://services.glpi-network.com"
GLPI_MARKETPLACE_ALLOW_OVERRIDE: true
GLPI_MARKETPLACE_MANUAL_DOWNLOADS: true
GLPI_USER_AGENT_EXTRA_COMMENTS: ""
GLPI_DISABLE_ONLY_FULL_GROUP_BY_SQL_MODE: "1"
GLPI_AJAX_DASHBOARD: "1"
GLPI_CALDAV_IMPORT_STATE: 0
GLPI_DEMO_MODE: "0"
GLPI_CENTRAL_WARNINGS: "1"
GLPI_NETWORK_REGISTRATION_API_URL: "https://services.glpi-network.com/api/registration/"
GLPI_MARKETPLACE_PLUGINS_API_URI: "https://services.glpi-network.com/api/marketplace/"
GLPI_I18N_DIR: "/var/www/glpi/locales"
GLPI_VERSION: "10.0.8"
GLPI_SCHEMA_VERSION: "10.0.8"
GLPI_MARKETPLACE_PRERELEASES: false
GLPI_MIN_PHP: "7.4.0"
GLPI_MAX_PHP: "8.3.0"
GLPI_YEAR: "2023"

</pre></details><details><summary>Libraries</summary><pre> 
htmlawed/htmlawed version 1.2.14 in (/var/www/glpi/vendor/htmlawed/htmlawed)
phpmailer/phpmailer version 6.8.0 in (/var/www/glpi/vendor/phpmailer/phpmailer/src)
simplepie/simplepie version 1.5.8 in (/var/www/glpi/vendor/simplepie/simplepie/library)
tecnickcom/tcpdf version 6.6.2 in (/var/www/glpi/vendor/tecnickcom/tcpdf)
michelf/php-markdown in (/var/www/glpi/vendor/michelf/php-markdown/Michelf)
true/punycode in (/var/www/glpi/vendor/true/punycode/src)
iamcal/lib_autolink in (/var/www/glpi/vendor/iamcal/lib_autolink)
sabre/dav in (/var/www/glpi/vendor/sabre/dav/lib/DAV)
sabre/http in (/var/www/glpi/vendor/sabre/http/lib)
sabre/uri in (/var/www/glpi/vendor/sabre/uri/lib)
sabre/vobject in (/var/www/glpi/vendor/sabre/vobject/lib)
laminas/laminas-i18n in (/var/www/glpi/vendor/laminas/laminas-i18n/src)
laminas/laminas-servicemanager in (/var/www/glpi/vendor/laminas/laminas-servicemanager/src)
monolog/monolog in (/var/www/glpi/vendor/monolog/monolog/src/Monolog)
sebastian/diff in (/var/www/glpi/vendor/sebastian/diff/src)
donatj/phpuseragentparser in (/var/www/glpi/vendor/donatj/phpuseragentparser/src/UserAgent)
elvanto/litemoji in (/var/www/glpi/vendor/elvanto/litemoji/src)
symfony/console in (/var/www/glpi/vendor/symfony/console)
scssphp/scssphp in (/var/www/glpi/vendor/scssphp/scssphp/src)
laminas/laminas-mail in (/var/www/glpi/vendor/laminas/laminas-mail/src/Protocol)
laminas/laminas-mime in (/var/www/glpi/vendor/laminas/laminas-mime/src)
rlanvin/php-rrule in (/var/www/glpi/vendor/rlanvin/php-rrule/src)
blueimp/jquery-file-upload in (/var/www/glpi/vendor/blueimp/jquery-file-upload/server/php)
ramsey/uuid in (/var/www/glpi/vendor/ramsey/uuid/src)
psr/log in (/var/www/glpi/vendor/psr/log/Psr/Log)
psr/simple-cache in (/var/www/glpi/vendor/psr/simple-cache/src)
psr/cache in (/var/www/glpi/vendor/psr/cache/src)
league/csv in (/var/www/glpi/vendor/league/csv/src)
mexitek/phpcolors in (/var/www/glpi/vendor/mexitek/phpcolors/src/Mexitek/PHPColors)
guzzlehttp/guzzle in (/var/www/glpi/vendor/guzzlehttp/guzzle/src)
guzzlehttp/psr7 in (/var/www/glpi/vendor/guzzlehttp/psr7/src)
glpi-project/inventory_format in (/var/www/glpi/vendor/glpi-project/inventory_format/lib/php)
wapmorgan/unified-archive in (/var/www/glpi/vendor/wapmorgan/unified-archive/src)
paragonie/sodium_compat in (/var/www/glpi/vendor/paragonie/sodium_compat/src)
symfony/cache in (/var/www/glpi/vendor/symfony/cache)
html2text/html2text in (/var/www/glpi/vendor/html2text/html2text/src)
symfony/css-selector in (/var/www/glpi/vendor/symfony/css-selector)
symfony/dom-crawler in (/var/www/glpi/vendor/symfony/dom-crawler)
twig/twig in (/var/www/glpi/vendor/twig/twig/src)
twig/string-extra in (/var/www/glpi/vendor/twig/string-extra)
symfony/polyfill-ctype not found
symfony/polyfill-iconv not found
symfony/polyfill-mbstring not found
symfony/polyfill-php80 not found
symfony/polyfill-php81 not found
symfony/polyfill-php82 in (/var/www/glpi/vendor/symfony/polyfill-php82)
league/oauth2-client in (/var/www/glpi/vendor/league/oauth2-client/src/Provider)
league/oauth2-google in (/var/www/glpi/vendor/league/oauth2-google/src/Provider)
thenetworg/oauth2-azure in (/var/www/glpi/vendor/thenetworg/oauth2-azure/src/Provider)
phpCas version 1.3.8 in (/usr/share/php/CAS/source)

</pre></details><details><summary>LDAP directories</summary><pre> 
Server: '172.16.0.1', Port: '389', BaseDN: 'DC=mydomain,DC=local', Connection filter: none, RootDN:
		'CN=GLPI,OU=OU_Applicatifs,DC=mydomain,DC=local', Use TLS: none

</pre></details><details><summary>SQL replicas</summary><pre> 
Not active

</pre></details><details><summary>Notifications</summary><pre> 
Way of sending emails: SMTP (anonymous@mail.domain.fr)

</pre></details><details><summary>Plugins list</summary><pre> 
	news                 Name: Alertes                        Version: 1.12.1     State: Enabled                                 
		Install Method: Marketplace
	webapplications      Name: Applications Web               Version: 4.0.1      State: Enabled                                 
		Install Method: Marketplace
	fields               Name: Champs supplémentaires         Version: 1.20.6     State: Enabled                                 
		Install Method: Marketplace
	printercounters      Name: Compteurs Imprimantes          Version: 2.0.0      State: Installed / not activated               
		Install Method: Marketplace
	uninstall            Name: Cycle de vie des matériels (un Version: 2.9.0      State: Enabled                                 
		Install Method: Marketplace
	datainjection        Name: Data Injection                 Version: 2.13.2     State: Enabled                                 
		Install Method: Marketplace
	formcreator          Name: Form Creator                   Version: 2.13.6     State: Enabled                                 
		Install Method: Marketplace
	genericobject        Name: Gestion d'objets               Version: 2.14.3     State: Enabled                                 
		Install Method: Marketplace
	mreporting           Name: Plus de rapports               Version: 1.8.2      State: Enabled                                 
		Install Method: Marketplace
	reservation          Name: Reservation                    Version: 2.4.1      State: Enabled                                 
		Install Method: Manual

</pre></details>

Any idea ?

Last edited by tomHbarre (2023-07-13 12:40:53)

Offline

#2 2023-07-07 16:07:17

cedric-anne
Administrator
Registered: 2018-07-02
Posts: 83

Re: [SOLVED] Inventory fills php-errors.log with 'SQL Server' warnings

Hi,

You should probably add surrounding `/` to your regex: `/SQL Server (.*) DMF/`.

Offline

#3 2023-07-07 16:13:23

tomHbarre
Member
From: Normandie
Registered: 2021-01-08
Posts: 6

Re: [SOLVED] Inventory fills php-errors.log with 'SQL Server' warnings

I'm gonna try this, thanx

Offline

#4 2023-07-07 16:27:21

tomHbarre
Member
From: Normandie
Registered: 2021-01-08
Posts: 6

Re: [SOLVED] Inventory fills php-errors.log with 'SQL Server' warnings

It seems to work, no more error since a moment !

Thank you smile

Offline

Board footer

Powered by FluxBB