SunQuest
           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:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old June 15th, 2001, 02:09 PM
jeofoyster jeofoyster is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: L.A.
Posts: 4 jeofoyster User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question PHP's FTP Functions - problem

Hey there.

I'm trying to use these newer FTP functions - and I keep getting errors:
"Error opening C:\dir\file.jpg in /usr/local/www/place/upload.php on line
33".


What am I missing? That line has the the ftp_put() function on it.

J

Reply With Quote
  #2  
Old June 15th, 2001, 04:14 PM
jfromaz jfromaz is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: AZ
Posts: 5 jfromaz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to jfromaz Send a message via Yahoo to jfromaz
can you post your segment of code for your ftp session from connect to close?

-J

Reply With Quote
  #3  
Old June 15th, 2001, 04:20 PM
jeofoyster jeofoyster is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: L.A.
Posts: 4 jeofoyster User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
code

/*******FTP ACTION*********/
$conn_id = ftp_connect("ftp.place.com");

if (!$conn_id){ //Check to see if connection exists
echo "CANT CONNECT";
die();
}


// login with username and password

$login_result = ftp_login($conn_id, "$ftp_user_name", "$ftp_user_pass");


if (!$login_result) { // check for valid login
echo "<BR><BR><B>BAD LOGIN";
die();
}

// upload the file
$pic1 = str_replace("\\\\", "\\", $pic1); // replace the double
// slashes Windows inserts
// in its addresses.
$upfile1 = "dir/dir2/".$newfilename1;

$upload = ftp_put($conn_id, $upfile1, $pic1, FTP_BINARY);

// check upload status
if (!$upload) {
echo "WARNING: UPLOAD HAS FAILED. TRY AGAIN.";
die();
} else {
ftp_quit($conn_id);
}
/********END FTP ACTION*********/

Last edited by jeofoyster : June 15th, 2001 at 04:24 PM.

Reply With Quote
  #4  
Old August 3rd, 2004, 05:47 AM
tintin's Avatar
tintin tintin is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: Salt Lake City
Posts: 36 tintin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 8
Send a message via ICQ to tintin Send a message via MSN to tintin
Question Any Solution?

Hi,
Did u find any solution?
I am also getting stuck at this point...
My FTP script works fine transferring other files (other than IMAGE files)...but with images...it throows a Warning that it wasn't able to read the files.

Any idea why?

OS: Win2k [Windows NT 5.0 build 2195]
Web Server: Apache [2.0.39]
PHP: 4.2.2

Thanks in advance
Regards
WC
__________________
Hard work never killed anyone, but why give it a chance?

Reply With Quote
  #5  
Old August 3rd, 2004, 10:00 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Psycho Canadian
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jan 2001
Location: Canada
Posts: 4,784 Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 4 Weeks 18 h 2 m 3 sec
Reputation Power: 437
tintin please post your code in a NEW thread over in the PHP forums someone will answer you there.
Also please NOTE that this post was from 2001 we really rather not have old post brought back up, espetially when your question can be answered in the above mentioned forum.
__________________
Miscellaneous Software
Viper_SB
Developershed E-Support


Anyone else play chess?
Challenge me

Reply With Quote
  #6  
Old August 3rd, 2004, 11:01 PM
tintin's Avatar
tintin tintin is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: Salt Lake City
Posts: 36 tintin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 8
Send a message via ICQ to tintin Send a message via MSN to tintin
Thumbs up Thanks

Thanks Viper,
I will follow your advise.

Regards
WC

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > PHP's FTP Functions - problem


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 | 
  
 

IBM developerWorks




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