NYCPHP Meetup

NYPHP.org

[nycphp-talk] ftp_connect(): php_network_getaddresses: gethostbyname failed

Ben Sgro ben at projectskyline.com
Mon Jul 7 19:35:55 EDT 2008


Hello,

Maybe php or apache (whomever is execing the process) doesn't have perms 
to open a socket.

If your on a chrooted or some shared hosting plan this might happen - I 
really don't know though.

I'm guessing you googled this error message and found no help? If not, 
I'd surely hit up google.

- Ben

Rahmin Pavlovic wrote:
>
> On Jul 7, 2008, at 4:26 PM, anthony wlodarski wrote:
>>
>> $ftp_server = "ftp.domain.com";
>>
>> // set up a connection or die
>> $conn_id = ftp_connect($ftp_server) or die("Couldn't connect to 
>> $ftp_server");
>
>
>
> That's exactly what produces the error warning.  (I actually had 
> single-quotes, but same result either way.)
>
> When I ftp via shell, I get a 220 response straight-away, which makes 
> me think something else is going on..
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>



More information about the talk mailing list