PHP Error: getaddrinfo failed: Temporary failure in name resolution in /home/

#1
Any PHP programmer guru here. Kindly assist. This script was working fine, but now has issues.

Code:
 mysqli::mysqli(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/.../line#
 
#7
It points at this line. I'm not sure what i could have changed. Coz the only thing i changed was some page names. Like Site title, h1 and h2. The file is called class.php

Code:
 $this->db = new mysqli($this->configs->host, $this->configs->username, $this->configs->pass, $this->configs->database);
 
#8
It points at this line. I'm not sure what i could have changed. Coz the only thing i changed was some page names. Like Site title, h1 and h2.
Code:
 $this->db = new mysqli($this->configs->host, $this->configs->username, $this->configs->pass, $this->configs->database);
This is barely enough to do an analysis..the error could be carried over from a simple ; you have missed somewhere above this line of code.
 
#9
Ok, here is the full Error Code as it appears on the error log. I have only changed the database name to :XXXXXXXXX
Code:
[04-Aug-2017 17:29:39 UTC] PHP Warning:  mysqli::mysqli(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/XXXXXXXXXX/public_html/includes/class.php on line 116
And here is the line 116 in the file class.php that it is pointing to:
Code:
 $this->db = new mysqli($this->configs->host, $this->configs->username, $this->configs->pass, $this->configs->database);
Can you do a diagnosis with that?
 

amun

Village Elder
#10
is it a remote DB, if yes, are you using an IP for the HOST or a HOSTNAME, error seems to indicate that you might be using the latter and the HOSTNAME is unresolvable
 
#11
is it a remote DB, if yes, are you using an IP for the HOST or a HOSTNAME, error seems to indicate that you might be using the latter and the HOSTNAME is unresolvable
Hi, please, am a little new in php. Break it down. I'm hosting it on a server. It's a website that is live.
 

Top