matthewlesh Posted August 8, 2007 Share Posted August 8, 2007 Hello there, i seem to be getting the following error in a php script i am writeing to check if an FTP server is up. Warning: ftp_connect() [function.ftp-connect]: php_network_getaddresses: getaddrinfo failed: hostname nor servname provided Can someone tell me what this means.. and what i should do about it? Link to comment https://forums.phpfreaks.com/topic/63857-ftp_connect-error/ Share on other sites More sharing options...
tibberous Posted August 8, 2007 Share Posted August 8, 2007 I'm not 100% sure, but I might have had this same error with fopen on external urls. Try making a PHP page with: <?php echo phpinfo(); ?> And visiting it in a browser. Go to where it has SERVER_NAME and make sure that is right. If it is wrong, some functions give errors and it can't be a bitch to fix because it's the last thing you'd think to check. If that isn't it, maybe post your code? Link to comment https://forums.phpfreaks.com/topic/63857-ftp_connect-error/#findComment-318266 Share on other sites More sharing options...
matthewlesh Posted August 8, 2007 Author Share Posted August 8, 2007 actually i have kinda sorta gotten past that, but i am still having problams, you see what i am trying to do is see if a address i have got like "ftp://oafa:[email protected]/" is a working ftp server or not. Link to comment https://forums.phpfreaks.com/topic/63857-ftp_connect-error/#findComment-318275 Share on other sites More sharing options...
dg Posted August 8, 2007 Share Posted August 8, 2007 try giving the ftp server name: like ftp_connect('ftp_server_name'); and than use ftp_login(); Link to comment https://forums.phpfreaks.com/topic/63857-ftp_connect-error/#findComment-318280 Share on other sites More sharing options...
NArc0t1c Posted August 8, 2007 Share Posted August 8, 2007 Well, That's a common error you get while using php with network. Either the server is down or not properly configured. If you are pointing it to a shared hosting account, well I doubt it would work. If you are using a domain name to connect, try using the IP address. Link to comment https://forums.phpfreaks.com/topic/63857-ftp_connect-error/#findComment-318287 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.