this script used to upload files to the server without any issue:
$oFTPConn = ftp_connect($sFtpServer,21,600) or die("Unable to connect ot
$sFTPServer!"); //login to the ftp server and upload the file //
$iFtpTimeOut = ftp_set_option($oFTPConn, FTP_TIMEOUT_SEC, 600);
$cmdLogin = ftp_login($oFTPConn, $sFtpUserName, $sFtpPassWord) or
die("Unable to connect to login to the FTP server: $sFTPServer!");
$cmdUpload = ftp_put($oFTPConn, $sFullDestinationPath, $_POST['srcFile'],
FTP_BINARY);
if ($cmdUpload != FTP_FINISHED){
echo("There was an error uploading the file...");
}
$cmdCloseFTP = ftp_close($oFTPConn);
since the host company upgraded to php5, it appears to upload the files, but
they're always 1kb large? any idea what's going wrong? 4 2915
On Thu, 25 Nov 2004 09:55:03 -0500, "Nancy Drew" <ge*****@hotmail.com> wrote: this script used to upload files to the server without any issue:
$oFTPConn = ftp_connect($sFtpServer,21,600) or die("Unable to connect ot $sFTPServer!"); //login to the ftp server and upload the file // $iFtpTimeOut = ftp_set_option($oFTPConn, FTP_TIMEOUT_SEC, 600); $cmdLogin = ftp_login($oFTPConn, $sFtpUserName, $sFtpPassWord) or die("Unable to connect to login to the FTP server: $sFTPServer!"); $cmdUpload = ftp_put($oFTPConn, $sFullDestinationPath, $_POST['srcFile'], FTP_BINARY); if ($cmdUpload != FTP_FINISHED){ echo("There was an error uploading the file..."); } $cmdCloseFTP = ftp_close($oFTPConn);
since the host company upgraded to php5, it appears to upload the files, but they're always 1kb large? any idea what's going wrong?
How big were you expecting them to be?
--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
"Andy Hassall" <an**@andyh.co.uk> wrote in message
news:ms********************************@4ax.com... On Thu, 25 Nov 2004 09:55:03 -0500, "Nancy Drew" <ge*****@hotmail.com>
wrote:this script used to upload files to the server without any issue:
$oFTPConn = ftp_connect($sFtpServer,21,600) or die("Unable to connect ot $sFTPServer!"); //login to the ftp server and upload the file // $iFtpTimeOut = ftp_set_option($oFTPConn, FTP_TIMEOUT_SEC, 600); $cmdLogin = ftp_login($oFTPConn, $sFtpUserName, $sFtpPassWord) or die("Unable to connect to login to the FTP server: $sFTPServer!"); $cmdUpload = ftp_put($oFTPConn, $sFullDestinationPath,
$_POST['srcFile'],FTP_BINARY); if ($cmdUpload != FTP_FINISHED){ echo("There was an error uploading the file..."); } $cmdCloseFTP = ftp_close($oFTPConn);
since the host company upgraded to php5, it appears to upload the files,
butthey're always 1kb large? any idea what's going wrong? How big were you expecting them to be?
anywhere from 5kb to about 150 kb -- Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk> <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
"Nancy Drew" <ge*****@hotmail.com> wrote in message news:<jd********************@rogers.com>... this script used to upload files to the server without any issue:
$oFTPConn = ftp_connect($sFtpServer,21,600) or die("Unable to connect ot $sFTPServer!"); //login to the ftp server and upload the file // $iFtpTimeOut = ftp_set_option($oFTPConn, FTP_TIMEOUT_SEC, 600); $cmdLogin = ftp_login($oFTPConn, $sFtpUserName, $sFtpPassWord) or die("Unable to connect to login to the FTP server: $sFTPServer!"); $cmdUpload = ftp_put($oFTPConn, $sFullDestinationPath, $_POST['srcFile'], FTP_BINARY); if ($cmdUpload != FTP_FINISHED){ echo("There was an error uploading the file..."); } $cmdCloseFTP = ftp_close($oFTPConn);
since the host company upgraded to php5, it appears to upload the files, but they're always 1kb large? any idea what's going wrong?
By 'host company' do you mean the server you are sending -to- or the
one you are sending -from-?
Have you verified that the files uploaded really are 1K, or perhaps
you are getting a quirky directory reading?
Interesting problem!
"Nancy Drew" <ge*****@hotmail.com> wrote in message news:<jd********************@rogers.com>... this script used to upload files to the server without any issue:
$oFTPConn = ftp_connect($sFtpServer,21,600) or die("Unable to connect ot $sFTPServer!"); //login to the ftp server and upload the file // $iFtpTimeOut = ftp_set_option($oFTPConn, FTP_TIMEOUT_SEC, 600); $cmdLogin = ftp_login($oFTPConn, $sFtpUserName, $sFtpPassWord) or die("Unable to connect to login to the FTP server: $sFTPServer!"); $cmdUpload = ftp_put($oFTPConn, $sFullDestinationPath, $_POST['srcFile'], FTP_BINARY); if ($cmdUpload != FTP_FINISHED){ echo("There was an error uploading the file..."); } $cmdCloseFTP = ftp_close($oFTPConn);
since the host company upgraded to php5, it appears to upload the files, but they're always 1kb large? any idea what's going wrong?
Possibly you need to use this function: http://www.php.net/manual/en/function.ftp-alloc.php
What type of OS on the server(s) are you loading to/from? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: balzano_1 |
last post by:
Hi, im trying to upload a file from a client (windows) to an ftp
server (linux), i deciede to use some of php`s functions to connect
and authenticate etc.. i only wish to put a file on the server,...
|
by: Phil Powell |
last post by:
if (document.location.href.indexOf('?') >= 0) document.location.href
= document.location.href.substring(0,
document.location.href.indexOf('?'));
if (document.location.href.indexOf('#') >= 0) {...
|
by: fochie |
last post by:
Greetings,
I'm having a problem when I try to GET a file from my server
via xmlhttp when using Mozilla. With IE I can get any type of file
fine, get/display headers fine, etc. With Mozilla,...
|
by: valerio |
last post by:
Hi all,
I've some problem to import data to DB2 using the db2move and db2look
tools.
Follow the problem :
I have exported data from db2 v. 7 database on windows server, using
the db2look and...
|
by: Phoe6 |
last post by:
The Program Fragment is this:
int choice; /* Users Input Command */
..
..
..
printf("Enter a command: ");
fflush(stdin);
choice = getc(stdin);
printf("\n");
|
by: Debaser |
last post by:
I've recently read in one of my old C books that puts() is a better
function call with regard to performance than printf() in the
following situation:
puts("Some random text");
vs.
...
|
by: Rodo |
last post by:
Hi all,
I'm new to this whole thing. I have a bunch of text files that are created
by a software at work that keeps info one of our products. Each unit being
calibrated gets a "record" (track by...
|
by: anon.asdf |
last post by:
In terms of efficieny:
Is it better to use multiple putchar()'s after one another as one gets
to new char's
OR
is it better to collect the characters to a char-array first, and then
use...
|
by: Jonathan Wood |
last post by:
Greetings,
I was wondering if anyone here has a good understaning of the Session
object. I know there are options like the Session.Abandon method and the
regenerateExpiredSessionId setting,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |