• Register
0 votes
22 views

Problem :

I am new to PHP. I have written my first db.php IM USING CLOUD9 is my host.

But I am facing below error while trying to execute my code

Php_network_getaddresses getaddrinfo failed name or service not known

How to fix above error?

8 4 2
2,300 points

1 Answer

0 votes

Solution :

I have read your question. It seems you have just started learning PHP.

I can explain this in simple English, this error message simply means: "I am unable to know the address of your server."

Now in technical words the error message means a hostname which you are trying to connect is not having any public nameserver record.

A database server can only be accessed by very few specific servers, it is because of the security feature just to prevent a whole world from accessing it. So everyone simply can not try to access or hack it

A host is the server which is allowed to connect to your database server which might most probably be a server you upload all your html/php/.. files to.

This error is simply caused by the network related stuff and it is not caused by your programming mistakes.

I hope the way I explained to you must so now it must be very helpful to you in resolving it.

5 2 1
4,980 points

Related questions

0 votes
1 answer 15 views
15 views
Problem: I get this message when i login with Filezilla. “Connection attempt failed with "eai_noname - neither nodename nor servname provided, or not known” Can any one guide further? My domain name is aaa.bbbb.com and cpanel ftp configuration told me that ftp server is ftp.aaa.bbb.com Looks like something related with dns resolving?
asked Jul 16 quizzBabes 160 points
2 votes
1 answer 39 views
39 views
Problem : I am very new to SQL Server 2008 Management Studio. I have recently connected my SQL Server 2008 Management Studio with Windows authentication. After that I am facing below error "The request failed or the service did not respond in a timely fashion. Consult the event ... to fix above error from past couple of days but I am unable to fix it. Can somebody guide me in fixing above error ?
asked Mar 25 morrisBson 3.2k points
0 votes
1 answer 6 views
6 views
I keep on recieving this error in my php project “failed to open stream: no such file or directory” each time I need to include a php file. What is the best practice to include another php file from a different folder? Is it also possible to include a php file located in a different domain?
asked Oct 12 azriel 530 points