473,467 Members | 1,577 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

problem with ftp_put and ftp_get

I'm trying to make simple ftp client, used the following article for base:
http://www.devarticles.com/c/a/PHP/B...nt-With-PHP/3/

All works, I can login, see list of files, but except ftp_put and ftp_get
functions. They return always false. I tried to set passive mode, it doesn't
help.

Any advice will be appreciated.
Dec 5 '05 #1
5 5507
All works, I can login, see list of files, but except ftp_put and ftp_get
functions. They return always false. I tried to set passive mode, it doesn't
help.


Code? Have you tried removing the "@" error-suppressing character from
the function calls and letting PHP tell you it thinks the problem is?

---
Steve

Dec 5 '05 #2
I tried, but it doesn't work, echo gives nothing.

$putFile = ftp_put($conn, $remotefile, $localfile, FTP_BINARY);

echo $putFile;

"Steve" <go********@nastysoft.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
All works, I can login, see list of files, but except ftp_put and ftp_get
functions. They return always false. I tried to set passive mode, it
doesn't
help.


Code? Have you tried removing the "@" error-suppressing character from
the function calls and letting PHP tell you it thinks the problem is?

---
Steve

Dec 5 '05 #3
Code? Have you tried removing the "@" error-suppressing character from
the function calls and letting PHP tell you it thinks the problem is?
I tried, but it doesn't work, echo gives nothing.


Odd. Have you enabled error reporting and display?

ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);
---
Steve

Dec 5 '05 #4
insert it, same result

"Steve" <go********@nastysoft.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
> Code? Have you tried removing the "@" error-suppressing character from
> the function calls and letting PHP tell you it thinks the problem is?

I tried, but it doesn't work, echo gives nothing.


Odd. Have you enabled error reporting and display?

ini_set('error_reporting', E_ALL);
ini_set('display_errors', TRUE);
---
Steve

Dec 6 '05 #5
I had some issues when I was working on an FTP program for a client of
mine as well. I switched it around and used ftp_fput, which works with
an open file stream, and that seemed to clear up my issues. The main
thing was to open the file first, then upload it.

http://us3.php.net/manual/en/function.ftp-fput.php

Dec 9 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Joseph Markovich | last post by:
I'm trying to write a script for my users to be able to upload large files, and now I am unsure what exactly I am doing wrong. My script is based on the one in the PHP manual. <?php if(isset(...
0
by: John | last post by:
Are there any precautions that I should take when downloading a file from a remote file on Linux platform to a local file in Win98 platform? I am using the method ftp_get $remotefile =...
1
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,...
2
by: Udo Pecher | last post by:
I apply the following code test.php $upload =ftp_put($conn_id,"test.jpg","$dat",FTP-BINARY); where $dat is a local filename which I like to move via FTP. "test.jpg" ist the filename on the...
0
by: rstuckart | last post by:
A script successfully connects to a remote server, logs in, reports the size of a file on the server. The problem is that it will not download the file with either ftp_get or ftp_fget. The...
5
by: tripwater | last post by:
Hello, I am having problems with the ftp_put() function. I can login via shell prompt. Does anyone know why the ftp_put() function may not work? I went to the php site and followed the...
1
by: ralphNOSPAM | last post by:
I'm trying to download a text file named KLAX.TXT at tgftp.nws.noaa.gov using if (ftp_get($conn_id, "Metar Reports/$local_file", $server_file, FTP_BINARY)) { print "Success";
2
by: cxian | last post by:
Hi all, I am trying to download files from a remote with the use of ftp_get. Somehow, the script always return to false. Here's what I got: $conn_id = ftp_connect($ftp_host);...
1
by: irfan.mohammed | last post by:
Dear All, I need your help,i am using ftp_get for getting the file from remote machine.now i am able to save only at one location.i want the user to select the directory any where in the...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
1
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...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.