1 (edited by SQuiffSquiff 2017-04-18 14:02:35)

Topic: php_network_getaddresses: getaddrinfo failed: Name or service not know

This is now fixed Setup query was unlcear- need to enter 'localhost' at first query for 'configure database!

I am attempting to setup GLPI on Ubuntu 16.04.2 fully updated. I have installed Ubuntu with the task selection 'lamp-server' and the additional packages required by glpi according to set-up self-test (all from Ubuntu repos). GLPI is the latest stable zip from the project site. I am encountering the error:

Can't connect to the database
The server answered: php_network_getaddresses: getaddrinfo failed: Name or service not known

I have added the line to the bottom of /etc/apache2/apache2.conf:

ServerName glpicatalogue

The server /etc/hosts includes the following:       localhost glpicatalogue.<mydomainname>.<myTLD> glpicatalogue       glpicatalogue.<mydomainname>.<myTLD> glpicatalogue   glpicatalogue.<mydomainname>.<myTLD> glpicatalogue

I have restarted the services and indeed the entire server several times.Neither have made any visible difference.

As well as accessing the web browser setup by name, I am able to contact the server using the name 'glpicatalogue' on my local network using both ssh and using mysqlclient from a centos machine. I am also able to access the mysql account for glpi on the command line fro the server using the account set for glpi. This suggests to me that DNS and MySQL are not the problems, but rather something with PHP. The trouble is that all the 'fixes' I have seen searching online are either redundant (e.g. last month's bad libc6 update for Ubuntu) or for other LAMP applications with options to configure the PHP setup within the application. As I have not yet got the application setup, I don't yet have any GUI config options.

Any ideas?