FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 26th, 2003, 04:41 AM
almightymike almightymike is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 3 almightymike User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Warning: ftp_connect() [function.ftp-connect]: php_network_getaddresses: getaddrinfo

help. i'm trying to use PHP's FTP functions but I get this error. Anyone can help me? What should I do?

Reply With Quote
  #2  
Old May 26th, 2003, 04:46 AM
Jeb.'s Avatar
Jeb. Jeb. is offline
Gogo Google.
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Adelaide, Australia
Posts: 226 Jeb. User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to Jeb.
That's the entirety of your error?

Reply With Quote
  #3  
Old May 26th, 2003, 04:51 AM
almightymike almightymike is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 3 almightymike User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
well, i used the simple ftp connection script on manual.

Quote:
<?php
$ftp_server = 'ourftpserver,port';
$ftp_user_name = 'mike';
$ftp_user_pass = 'mikepass';
<?php
// set up basic connection
$conn_id = ftp_connect($ftp_server);

// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);

// check connection
if ((!$conn_id) || (!$login_result)) {
echo "Ftp connection has failed!";
echo "Attempted to connect to $ftp_server for user $ftp_user_name";
die;
} else {
echo "Connected to $ftp_server, for user $ftp_user_name";
}

// upload the file
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);

// check upload status
if (!$upload) {
echo "Ftp upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}

// close the FTP stream
ftp_close($conn_id);
?>



the errors i get are

Warning: ftp_connect() [function.ftp-connect]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /disk1/apache/htdocs/test/ftp3.php on line 5

Warning: ftp_login() expects parameter 1 to be resource, boolean given in /disk1/apache/htdocs/test/ftp3.php on line 8
FTP connection has failed!Attempted to connect to for user www

Last edited by almightymike : May 26th, 2003 at 04:53 AM.

Reply With Quote
  #4  
Old May 26th, 2003, 05:04 AM
Jeb.'s Avatar
Jeb. Jeb. is offline
Gogo Google.
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Adelaide, Australia
Posts: 226 Jeb. User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to Jeb.
That means it can't find the FTP server you're talking about. Domain name doesn't exist, name resolution failed (DNS = dead), or ... I see.

$ftp_server = 'ourftpserver,port';
$conn_id = ftp_connect($ftp_server);

I think, you want something like this:
PHP Code:
 $ftp_server 'ourftpserver';
$ftp_port 'port';
$conn_id ftp_connect($ftp_server,$ftp_port); 


I don't know if that was a typo or not, but I suggest you check out the prototype of ftp_connect() in the manual again

hth.

Reply With Quote
  #5  
Old May 26th, 2003, 05:19 AM
almightymike almightymike is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 3 almightymike User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
WOW! it worked!! damn, thought something wrong with our installation.
Thanks jeb!

Last edited by almightymike : May 26th, 2003 at 05:25 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > Warning: ftp_connect() [function.ftp-connect]: php_network_getaddresses: getaddrinfo


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT