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:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old March 13th, 2004, 01:20 AM
Unimagined Unimagined is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 86 Unimagined User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
FTP upload script

I wrote this FTP script to upload files to my server. it works perfectly, but when I try to upload larger images 10k and above, it won't upload them. Why?

Here's my script:

-----------------------------------------------------------
$filec = "C:\blah.txt";

$uname = "username";
$pass = "********";
$remote = "/test/$filec";

$ftpc = ftp_connect('ftp.nakedsexy.us');

if (ftp_login($ftpc, $uname, $pass)) {
print ("FTP logged in...<br />\n");
} else {
print ("FTP could not login.<br />\n");
}
if (ftp_put($ftpc, $remote, $filec, FTP_BINARY)) {
print ("File was uploaded.<br />\n");
} else {
print ("File was not uploaded.<br />\n");
}
ftp_close($ftpc);
-----------------------------------------------------------

Can someone help me with it, tell me what I have to add to make it be able to upload files up to 90 kilobytes? I need to get it so it can upload files from 0 kilobytes to 90 kilobytes. I don't have any idea why it won't upload files larger than 5-10 kb. I need help.

Reply With Quote
  #2  
Old March 13th, 2004, 06:56 AM
x2designs x2designs is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Hampshire
Posts: 266 x2designs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 59 m 18 sec
Reputation Power: 5
Send a message via AIM to x2designs
Try setting $post_max_size="10000000"; or whatever value you like
__________________
Ian Jamieson - www.urbantricking.com

Reply With Quote
  #3  
Old March 14th, 2004, 03:15 AM
Unimagined Unimagined is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 86 Unimagined User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
?

Where does that variable come from? Where's it get used? I don't know where to put it in my script.

Reply With Quote
  #4  
Old March 14th, 2004, 07:29 AM
dirtbox's Avatar
dirtbox dirtbox is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Belfast sumwhere, although it could be Lisburn not too sure
Posts: 177 dirtbox User rank is Private First Class (20 - 50 Reputation Level)dirtbox User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 h 13 m 36 sec
Reputation Power: 5
Its in the php.ini
__________________
Linux Apache Mysql PHP -
http://fedora.redhat.com/

Reply With Quote
  #5  
Old March 14th, 2004, 07:45 AM
Unimagined Unimagined is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 86 Unimagined User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Do I set it as:
$post_max_size="10000000";
or as:
post_max_size="10000000";

?

What part of the ftp script I wrote do I put it in? Do I put it here:

-----------------------------------------------------------
$filec = "C:\blah.txt";

$uname = "username";
$pass = "********";
$remote = "/test/$filec";

$ftpc = ftp_connect('ftp.nakedsexy.us');

if (ftp_login($ftpc, $uname, $pass)) {
$post_max_size="10000000";
print ("FTP logged in...<br />\n");
} else {
print ("FTP could not login.<br />\n");
}
if (ftp_put($ftpc, $remote, $filec, FTP_BINARY)) {
print ("File was uploaded.<br />\n");
} else {
print ("File was not uploaded.<br />\n");
}
ftp_close($ftpc);
-----------------------------------------------------------

?

Reply With Quote
  #6  
Old March 14th, 2004, 07:53 AM
e4c5 e4c5 is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2003
Posts: 778 e4c5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 23 m 20 sec
Reputation Power: 5
I think you need to read a lot of the FM or at least read the comments in the php.ini file.
__________________
A lean and mean secure FTP applet with GUI. Just 150 kb in size
http://www.radinks.com/sftp

Reply With Quote
  #7  
Old March 14th, 2004, 11:35 AM
Unimagined Unimagined is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 86 Unimagined User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
I will

Right now I'm just trying to find out how to make my ftp upload script able to upload a larger file than it's able to now. That script works fine, but only with small files.

Reply With Quote
  #8  
Old March 29th, 2004, 12:17 PM
KLM KLM is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 1 KLM User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi!
I'm about make an FTP upload for my customers on our website. So that they can go into our website and upload files to our ftp-server. How can I use this script and make the customers browse their local machine and upload files to me? I want the $filec you specified to be the file that they choose from their local disk. Any ideas? Im sort of a newbie

Thanx. KLM

Reply With Quote
  #9  
Old March 30th, 2004, 01:52 AM
dirtbox's Avatar
dirtbox dirtbox is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Belfast sumwhere, although it could be Lisburn not too sure
Posts: 177 dirtbox User rank is Private First Class (20 - 50 Reputation Level)dirtbox User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 h 13 m 36 sec
Reputation Power: 5
personally id use a <input type="file" name="file2b_ftpd"> to post the file to the script

Reply With Quote
  #10  
Old March 31st, 2004, 12:07 AM
twostepted's Avatar
twostepted twostepted is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2004
Location: Central Washington (USA)
Posts: 515 twostepted User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 50 m
Reputation Power: 5
Send a message via Yahoo to twostepted
If you put this in the same form with your file input control, I think it'll do the trick.

<input type="hidden" name="MAX_FILE_SIZE" value="1000000">

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > FTP upload script


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