PHP Classes

Curl Error number: 6 Error message: name lookup timed out

Recommend this page to a friend!

      Browser  >  All threads  >  Curl Error number: 6 Error message:...  >  (Un) Subscribe thread alerts  
Subject:Curl Error number: 6 Error message:...
Summary:I always get cURL Error Nr.6 when executing the example script
Messages:5
Author:innocent_judas
Date:2009-08-04 18:24:21
Update:2009-08-05 09:47:30
 

  1. Curl Error number: 6 Error message:...   Reply   Report abuse  
Picture of innocent_judas innocent_judas - 2009-08-04 18:24:21
When i exexute the exemple file (browser.example.php) on my localhost i'll get the following error Message :

Error Occured in Curl Error number: 6 Error message: name lookup timed out

and

Exception: Malformed HTML server response from url: http://en.wikipedia.org
/wiki/Main_Page in /var/www/php browser simulation/browser.class.php on line
189

But i think the second error message is only a consequence of the cURL error.

Maybe one of you knows how to resolve this ?

  2. Re: Curl Error number: 6 Error message:...   Reply   Report abuse  
Picture of Jon Gjengset Jon Gjengset - 2009-08-04 19:46:19 - In reply to message 1 from innocent_judas
Well... The name lookup error of curl usually comes from the server not being able to resolve the address you're trying to access. This again is most often due to the server not having a working internet connection ( which sounds very strange indeed... )

Do you get the error at the navigate() step, or later in the scripts execution?

  3. Re: Curl Error number: 6 Error message:...   Reply   Report abuse  
Picture of innocent_judas innocent_judas - 2009-08-05 09:19:26 - In reply to message 2 from Jon Gjengset

Now i tested it on my provider and the script works fine.

Maybe it is some setting in the php.ini that i have to change...
Now i'll compare the phpinfo(); from both servers.

>Do you get the error at the navigate() step, or later in the scripts execution?
I get the error on the navigate() step (line 17).

thanks for your reply.

  4. Re: Curl Error number: 6 Error message:...   Reply   Report abuse  
Picture of innocent_judas innocent_judas - 2009-08-05 09:47:30 - In reply to message 3 from innocent_judas
Now it works !!

I just had to change my DNS settings (ubuntu : etc/resolv.conf ).

I'm using a adsl-router but the DNS adress was wrong. Now i set it to 192.168.1.1 and it works.

*jubeljubelfreufreu*

  5. Re: Curl Error number: 6 Error message:...   Reply   Report abuse  
Picture of sparow lite sparow lite - 2019-01-29 09:47:44 - In reply to message 3 from innocent_judas
All the information have been discussed here very nicely. I want to fix Windows 10 error. I have visited https://errorcode0x.com/windows-10-preparing-automatic-repair-error-fixed/ page. How can I solve it?

 
For more information send a message to info at phpclasses dot org.