Slackware :: Php Curl Can't Resolve Host Getting Error?

Jan 26, 2011

I have a strange problem with using curl function in php on slackware machines. So far I tested this on 2 PCs. I din't test it on any other distributions, so I don't know if it's only slackware problem.

Problem is that I can't use php curl in normal way. It can be tested wit simple code:

Code:
$ch = curl_init("url");
$content = curl_exec($ch);
if (curl_error($ch)) {
echo(curl_error($ch) . "<br>");
}
echo($content);
When I'm opening this php script in browser I'm getting error message:

Code:
Couldn't resolve host 'google.lv'
but I can use curl command in terminal, also it works when I run this php script in terminal like:

Code:
php ./curl_test.php
So problem is not in curl or php itself, but in apache, because this happens only when this script is running in apache.

Searching google a lot, I got to conclusion that apache can't read /etc/resolve.conf file during startup. Strange thing is that it happens only when httpd starts during system startup, but if I'm stopping httpd and starting it again manually, it works as it should until I'll reboot my PC. Restarting httpd also do not work, I need to do start -> stop.

I think that apache reads /etc/resolve.conf only when it starting up and as I have DHCP, maybe network is still not ready at the moment of httpd startup.

I didn't try to configure php as php-cgi instead of apache module, I think then it would work normally because each php script would be separate process and it would read dns information each time, so the same like starting php script in terminal with command:

Code:
php ./curl_test.php
I think there are some ways to workaround it, e.g. delay somehow start of httpd during system startup, or something like that, but I want to find reason of this problem and make it work without any workaround.

View 1 Replies


ADVERTISEMENT

SUSE :: Registration Error - Curl: (7) Could't Connect To Host

Feb 17, 2010

I have two suse linux server. Recently we got the license key. In one server i could able to register successfully. Another server is throwing an error.i am using yast-software- Novel customer center configuration. After selecting configure now, i am getting error has follows Execute curl command failed with 7 curl: (7) could't connect to host.

View 3 Replies View Related

Slackware :: Unable To Resolve Host Address `dls.urt.voxel.net'

Jul 17, 2010

when tring to install (AssaultCube, UrbanTerror) i get this: unable to resolve host address `dls.urt.voxel.net'

View 2 Replies View Related

Slackware :: Running Multi For 32 Bit Support - Error Loading CURL Library

Jun 27, 2010

I'm running Slack 13.1 64 bit. I'd like to try running multi for 32 bit support so I can run a 32 bit version of firefox using the 32 bit flash plugin. Here's what I did: - followed Alien Bob's Wiki and download and installed all the *txz files. - installed a bunch of required libraries following the instructions on the Wiki - installed the 32 bit 10.1 version of the flash player plugin in $HOME/.mozilla/plugins/ - started the 32 bit 3.6.3 version of firefox; it seems to work fine. - go to about plugins and verify that Shockwave Flash (libflashplayer.so) is version 10.1 r53 and it is enabled. - run "ldd libflashplayer.so" and verified that all libraries are found. - run "ldd /usr/lib/firefox-3.6.3/firefox-bin" and verified all libraries are found. - go to [URL]... and click on "test your adobe flash player installation" I will get this error: Adobe Flash Player error: could not load cURL library - I verified (repeatedly) that I do have what I think is the correct package. How can I fix (or start debugging) this error?

View 7 Replies View Related

Fedora Installation :: YUM Error Couldn't Resolve Host Name

Dec 19, 2009

i get the following error when i try to install autoten: root@Tex dan]# rpm -Uvh [URL]... curl: (6) Couldn't resolve host 'dnmouse.org'
error: skipping [URL]... - transfer failed from reading other posts, it sounds like a dns error, but i don't know what to do to fix it.

View 14 Replies View Related

Ubuntu :: Sudo: Unable To Resolve Host Username Getting Error?

Nov 26, 2010

When I try to launch something from terminal, it shows this error.

gksudo gedit /etc/hosts

Quote:

127.0.0.1localhost
127.0.1.1matt-laptop
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

My computer always had this name and I never had concerns related to his name. So, what's wrong now?

View 8 Replies View Related

Fedora Networking :: Can Ping But Can't Resolve In Curl - Firefox

Aug 13, 2009

I'm having a strange problem with my Fedora 11 install under VMWare Server. I can look up hosts in nslookup, host, and I can ping servers using their names, but when I use curl, firefox, or yum, it says it can't resolve the host name.

View 6 Replies View Related

OpenSUSE Install :: Unable To Upgrade To 11.4: Can't Resolve Host / Error Code: Connection Failed?

Apr 1, 2011

I'm currently running 11.3 and decided I'd try upgrading to 11.4 following the instructions here: SDB:System upgrade - openSUSEUnfortunately, my attempts are defeated at the point of trying to refresh the new repos; I get the following message (for the oss repo, in this case):

Download (curl) error for 'url':
Error code: Connection failed
Error message: Couldn't resolve host 'download.opensuse.org'

With 11.4 replaced by 11.3 in the repo url, it refreshes just fine. The only repository that works when I change 11.3 to 11.4 is the Packman repo. I'm not really sure why the connection fails for 11.4 but not 11.3!

Further info: I have an old router with no IPv6 support, but have IPv6 disabled system-wide. I can enter the url for the repositories into firefox and they come up just fine - it's only with zypper/YaST that I get the above error message.I also tried upgrading using the network CD but ran into the same sort of problem. In this case it may be because the CD installer doesn't disable IPv6. (I didn't want to download the DVD at my connection speed, and the KDE live CD is not listed as suitable for upgrade).

View 9 Replies View Related

OpenSUSE Install :: Error Message: Couldn't Resolve Host 'download.opensuse.org'

Apr 20, 2011

This is an example of the error I receive when trying to do an update via YaST, YaST2, or zypper. Basically, curl is broken. With out it functioning normally, I can't use openSUSE's update mechanism to fix my system. Need to find a way to manually fix / upgrade curl.There was an error in the repository initialization.'Updates-for-openSUSE-11.4-11.4-0': [|] Valid metadata not found at specified URL(s)History:

- Unknown error reading from 'http://download.opensuse.org/update/11.4/'
- SKIP request: User-requested skipping of a file
- Download (curl) error for

[code]...

View 8 Replies View Related

Fedora :: Yum Error - "Couldn't Resolve Host"?

Aug 1, 2011

My latest issue seems to be with Yum; more specifically, I don't think it can contact the main "updates" server to see if there's any actual updates available. When I try, I get this:

Code:
[root@localhost ~]# yum update
Loaded plugins: langpacks, presto, refresh-packagekit

[code]...

View 6 Replies View Related

General :: Curl - Curl API To Configure Only The Required Protocol?

Jun 24, 2010

Is there any curl API to configure only the required protocol. If I have proper openssl installed, the installed curl will have all the protocols (like HTTP, HTTPS, FTP, File etc...) supported by default. Is there any way to allow or disallow only some of the protocol at the runtime. Say I need to support only HTTPS, FILE and I dont want to allow HTTP. Is there any way to do this?

View 1 Replies View Related

Networking :: Curl And Wget Error 400 Bad Request?

Nov 9, 2010

I use slackware current, and curl and wget give the following errors:

Code:
repo@cannabis ~]$ wget -r http://users.telenet.be/reggersjans
--2010-11-09 13:48:14-- http://users.telenet.be/reggersjans
Resolving users.telenet.be (users.telenet.be)... ::ffff:74.117.221.11, 74.117.221.11
Connecting to users.telenet.be (users.telenet.be)|::ffff:74.117.221.11|:80... connected.
HTTP request sent, awaiting response... 400 Bad Request

[Code]...

View 7 Replies View Related

Ubuntu Networking :: Could Not Resolve Host Name?

Apr 29, 2010

I'm having an issue where some of my machines hostnames are no longer able to be resolved after setting up a mythbuntu backend to allow netboot. Also it seems that which machines hostnames get resolved is not consistent. (ie sometimes one gets resolved and sometimes it doesn't) I suspect that it has something to do with the changes I made to "/etc/ltsp/dhcpd.conf" to get the netboot running.

I have a Verizon DSL modem/router as 192.168.1.1. Up until playing with the "/etc/ltsp/dhcpd.conf" I saw hostnames of all of my machines show up in its network map. Now, some of my machines still get network access but their hostnames are no longer resolved. What did I do wrong? Here is my dhcpd.conf file:

Code:
# Default LTSP dhcpd.conf config file.
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.2 192.168.1.250;

[Code]...

View 4 Replies View Related

General :: 'sudo -i' And Resolve Host

Mar 10, 2011

why does a machine try to resolve host when I issue 'sudo -i' or some other command prefixed with sudo.What is happening in the background?

View 11 Replies View Related

Ubuntu :: Curl Permission Error With /usr/local/bin/repo?

Aug 2, 2010

I'm trying to grab "repo" using curl and put it into /usr/local/bin/ but I can't seem to figure out why I'm getting a permission error:

Code:
$ sudo curl https://android.git.kernel.org/repo > /usr/local/bin/repo
bash: /usr/local/bin/repo: Permission denied

[code]....

View 1 Replies View Related

General :: Host Key Verification Failed / Resolve This?

Mar 29, 2011

I know that there are multiple threads with problems like this, but still i didn't found my answer.

The situation is like this:
I have a local server and a remote server, i did a ssh key swap so i can log on to the remote server with no problems (automatically logging on, no need to enter pass or login).
I've made a script that copies (with SCP) a file FROM the REMOTE server TO the LOCAL server (NOT FROM the LOCAL server to the REMOTE server !!!!), and then i get an error like code...

View 2 Replies View Related

General :: Using CURL To Download All Files In Certain Folder - Except 404 Error Page?

May 6, 2011

I'm using cURL in ubuntu to download some files like

While some files may be missing from this sequence but when I just use curl -O [url]

cURL will download a 404 error page for those missing ones. How can I avoid this?

View 1 Replies View Related

Debian Configuration :: When Open A Web Browser - Can't Resolve The Host Name

Mar 29, 2011

I've just installed Debian Squeeze from a live CD. When I open a web browser (be it iceweasel or epiphany) and try to go to google.com, it tells me it can't resolve the host name. [Edit: They do, however, allow me to go anywhere on debian.org, minus the search feature] I also get the same error when I try to go to my website running on a local server. However, when I type the server's IP address (192.168.0.10), it goes to the website fine. Basically, any program I run that needs to resolve a host name returns an error, with the exception of the host command:

I've tried changing my DNS server IP from 192.168.0.1 (my router, configured to provide DNS) to 192.168.1.254 (my internet modem, also configured to provide DNS). That didn't help any. Then I changed my DNS server IP to the same one used by the modem, and now everything works.

I've tried googling my way out of the issue, and I've found where someone had the same issue as I've got and fixed it by adding "blacklist ipv6" to their /etc/modprobe.d/blacklist.conf file, but that didn't work for me.

So, recap: Why does resolving domain names fail for certain applications (except the "host" program) when the DNS server IP is that of my router or modem (which works fine for all of my other computers), but suddenly works when I point the computer straight to my ISP's DNS servers, and how can I permanently fix the problem?

View 4 Replies View Related

OpenSUSE Install :: Can't Resolve Host For Yast2 In Console?

Sep 3, 2011

It's been a while since I've use linux (specifically suse). But my wife and I are expecting our first child and our office/second bedroom is now being converted into the baby room. I built the computer that is currently in there and it is a really nice one that I do not want to get rid of. Two 500GB Sata2 drives and 8Gigs of RAM (not to mention my quad-core Phenom AMD processor and sweet asus motherboard) -- I just can't get rid of it. So what I planned to do was turn it into a small home server. I did some research and kept coming back to using opensuse as the server. I read this article The Perfect Server - OpenSUSE 11.4 x86_64 [ISPConfig 2] | HowtoForge - Linux Howtos and Tutorials and it seemed to have just about everything I'd like to do (maybe some extras that I don't really need, but might in the future). Everything was going fine until I got to a certain point. The install went fine, and I was starting to customize some of the settings for my own home setup. Now, the problem...

I've gotten to page 3 of the tutorial The Perfect Server - OpenSUSE 11.4 x86_64 [ISPConfig 2] - Page 3 | HowtoForge - Linux Howtos and Tutorials

and I am installing packages through yast2, and all the packages installed fine except for 'compat-readline4'. I think this is a form of command line editor or something to do with that. I am sure I am going to need it to finish the server set up, but I can't get it installed anywhere. I've tried to install it by pointing directly to the mirror found at rpm.pbone.net and still I get nowhere.

Yast2 auto refresh seems to fail everytime I run it. Even though I installed all the other packages, I get an error message that says it can't get the medium. When I look at the details of the error it says it can't resolve the host for downloads.opensuse.org.

View 9 Replies View Related

Ubuntu Servers :: Unable To Resolve Host / Hostname Is Set To (none)?

May 25, 2010

I just built out an Ubuntu Server 10.04.

My problem is setting the hostname. I cloned the machine, then normally on the clone, I would change the /etc/hostname and /etc/hosts file.


However, when I do this, upon restart, I get the message, "init hostname main process (some process number) terminated with status 1"Then, when the machine finally boots, the hostname is set to (none). Literally has braces like: user@(none):

I've tried: sudo hostname machine_name but it says can't resolve hostname (none).

I've Google'd around a lot but can't get it. It may have something to do with 10.04? I have been using 9.04, 9.10 with no problems.

eric@(none):~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
code....

View 9 Replies View Related

Ubuntu :: Unable To Resolve Host Tims-Laptop

Aug 11, 2010

i am having a problem in the terminal window. When i try to do various operations i get the following message before the operation starts.

sudo: unable to resolve host Tims-Laptop

View 6 Replies View Related

Software :: CURL Post Data Command From Shell - HTTP Error Code 408

Jan 29, 2011

I am trying to connect to the web interface found at [URL] using curl. This first requires login information to be entered at [URL], but I am having an issue with the login process. I am trying to submit the following form via POST:

Code:
<form action="j_security_check" method="post" id="login_form" name="login_form">
<center> <table style="background: #cac1cf;FONT-SIZE: 12px;">
<tr> <td align="center" colspan="2">Please enter your username and password:</td>
</tr> <tr> <td align="right">Username</td>
<td> <input name="j_username" style="width: 250px" id="j_username" type="text"/> </td>
</tr> <tr>
<td align="right">Password</td>
<td> <input style="width: 250px" name="j_password" id="j_password" type="password"/> </td>
</tr> <tr> <td colspan="2" align="center">
<input value="Enter" name="enter" type="submit"/>
<input value="Clear" name="Clear" type="reset"/>
</td> </tr> </table> </center> </form>
The command that I am using for this is the following:

Code:
curl -c cookies -b cookies -L -d "j_username=user%40domain.com&j_password=pass" [URL]
The command is properly formatted as far as I can tell. I tested it with another website using a similar authentication scheme using different POST variables specific to the form and it worked fine.

When I run the above command with the -v tag, it reveals this:
Code:
* Connected to lcl.uniroma1.it (151.100.4.74) port 80 (#0)
> POST /sso/j_security_check HTTP/1.1
> User-Agent: curl/7.21.0 (i686-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18
> Host: lcl.uniroma1.it
> Accept: */*
> Content-Length: 44
> Content-Type: application/x-www-form-urlencoded
>
} [data not shown]
< HTTP/1.1 408 The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser
< Date: Sat, 29 Jan 2011 15:26:41 GMT
< Server: Apache-Coyote/1.1
< Content-Type: text/html;charset=utf-8
< Content-Length: 1554
< Connection: close
<
{ [data not shown]
103 1554 100 1554 0 52 5081 170 --:--:-- --:--:-- --:--:-- 10223*
Closing connection #0

I cannot tell why the login timeout is expired when I try to do this, and my investigation toward this end has been fruitless. I saw a brief snippet on Google that vaguely suggested that the underscores in the domain name were at fault, but replacing these with their encoded counterparts did nothing to resolve the issue (that, and underscores should be fine when sent unencoded according to the standards). I have extensively perused the man pages and have come up with nothing to adequately explain this behavior. I also talked to a friend who has worked with curl in his line of work, but he mostly has experience in the context of PHP and has not dealt with this issue before. I am running GNU/Linux 2.6.35-22-generic-pae.

View 3 Replies View Related

Networking :: 'Unable To Resolve Host Address' Errors With Newer Distributions

Mar 10, 2010

I'm trying to troubleshoot some strange networking problems. The pattern seems to be that only newer distributions are affected. CentOS 5.4 and Ubuntu 8.04 work fine out-of-the-box. But Arch, Sidux, AntiX, Fedora, etc. show the same pattern of errors.Certain websites cannot be found unless I disable ipv6 in Firefox. And certain addresses cannot be resolved using various terminal commands (wget, apt-get, yum, etc.). What I would ideally like is a permanent solution, perhaps changing some settings on my router, so that I don't have to deal with this each time I test-drive a new distro. I have a hunch the issue has something to do with my DSL provider (Fairpoint) filing for bankruptcy.

One more piece of information that may or may not be relevant: I recently switched a website from one hosting company to another. I noticed there was a delay of several days where I saw the old version at the old host, but viewing the site at a friend's house or the coffee shop showed the new site on the new host. This leads me to suspect DNS issues perhaps, but this is not an area of expertise.

View 3 Replies View Related

General :: Error 'Method "curlQuery" Of Class "Twitter" Reported An Error: CURL Library Not Installed

Jan 19, 2010

I am installed cUrl from http://packages.ubuntu.com/lucid/amd64/curl/download for my ubuntu 9.0 with php 5.2 ,Apache 2.0.It was installed by gkebi package installer. but when i display phpinfo() curl not found since i was attempt to use phptwitter class. what is the proble i have? When i am trying to install again package installer shows same version of curl already found, but phptwitterclass shows following error 'Method "curlQuery" of class "Twitter" reported an error: CURL library not installed.'

View 1 Replies View Related

Ubuntu :: Sudo: Unable To Resolve Host / Setting Up Network Sharing With Samba?

May 21, 2010

I am having a problem with Ubuntu 10.04. I was setting up network sharing with Samba. Set up went fine, then I decided to change the hostname.

Following instructions I found on the web, I edited etc/samba/samba.conf to reflect my desired hostname.

Now I have to use superuser to run synaptic or update center. I don't know what else I have "broken".

I would like to change my hostname, if I did it incorrectly for 10.04 please enlighten me.

View 2 Replies View Related

Ubuntu Networking :: Domain - Unable To Resolve Host Whenever Try To Use The Sudo Command In The Terminal

Nov 4, 2010

Whenever I try to use the sudo command in the terminal I get the message unable to resolve host, then my computer name. Here's some command line output with some files which I think may be causing the problem. I have Operating Systems homework and need sudo

steve@steve-laptop:~$ sudo gedit /etc/resolv.conf
sudo: unable to resolve host steve-laptop
steve@steve-laptop:~$ cat /etc/resolv.conf
# Generated by NetworkManager
domain domain_not_set.invalid
search domain_not_set.invalid
nameserver 68.237.161.12
[Code].....

View 1 Replies View Related

Ubuntu Servers :: Unable To Resolve Host URL - Domain Setup / Home Based Web Server

Jan 18, 2011

I have setup a home based web server to host a photo blog for myself and my friends. I will be running wordpress and possibly a phpbb3 forum. I'd like to open this to discuss server administration, server setup, and server maintenance. However, I have a pretty good start on all of those but serving a domain name to my static ip. Here my static ip is 24.10.202.144. I registered a domain through [URL]... It appears that I have the domain working to forward to my ip. However, I am still getting this output file from apache.

[code]...

I have tested the domain name across a few different computers on different ips. It works appropriately. I just want to make sure I have it set correctly on the (apache) server side of things. Then I can get more into Zone Editing etc.

View 9 Replies View Related

Server :: Host Unknown Error:Sendmail / Stat=Host Unknown (Name Server: Def-fgh.com.: Host Not Found)?

Sep 8, 2009

Many of mails sent from my mail server that are in Queue;The main reason is deffered by domains like yahoo,aol,etc.but there is one more error that i keep getting and that is Host Unknown,Below is an example from mail log,The catch is,test mail sent on the same email id sent from my personal mail from the same server i.e. url was deliveredHowever,another mail containing client information sent from customercare@mycompanysdomain ended up in queue.

There are more examples of the same,around 20 domain have the same problem.

Sep 7 14:33:46 server2 sendmail[24591]: n8793jiC024589: to=<abc@xyz.fi>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=163672, relay=xyz.fi., dsn=5.1.2, stat=Host unknown (Name server: xyz.fi.: host not found)

Sep 7 22:09:42 server2 sendmail[6407]: n87Gdffa006403: to=<abc@def-fgh.com>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=152474, relay=def-fgh.com., dsn=5.1.2, stat=Host unknown (Name server: def-fgh.com.: host not found)

View 2 Replies View Related

General :: Fix Error"CURLOPT_USERNAME \ Undeclared "in Curl Ftp Programming?

Jun 9, 2010

i have written file transfer program using libcurl.

#include <stdio.h>
#include <curl/curl.h>
#include <curl/types.h>

[code]....

View 1 Replies View Related

Programming :: CURL In Bash - Error "Upload Is Disabled During Short Maintenance Work (ETA 10 Minutes). Brb"

Mar 7, 2010

i'm trying to write a bash script to upload an image to [URL], but i can't get i working properly. Everytime i try, the html returns me a error saying "Upload is disabled during short maintenance work (ETA 10 minutes). Brb!", while from the browser everything works fine. This is my current command line:

Code: curl -L -b cookie-pix.txt -c newcookie.txt www.pixhost.org/cover-upload -A "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" -F 0=@/home/admin/Desktop/karm.jpg -F content_type=0 -F press=Upload And this is the html of the form:

[Code]....

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved