Connecting Tech Pros Worldwide Forums | Help | Site Map

problem with ftp_put and ftp_get

Alex
Guest
 
Posts: n/a
#1: Dec 5 '05
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.



Steve
Guest
 
Posts: n/a
#2: Dec 5 '05

re: problem with ftp_put and ftp_get


[color=blue]
> 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.[/color]

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

---
Steve

Alex
Guest
 
Posts: n/a
#3: Dec 5 '05

re: problem with ftp_put and ftp_get


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

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

echo $putFile;

"Steve" <googlespam@nastysoft.com> wrote in message
news:1133803303.919070.264430@g14g2000cwa.googlegr oups.com...[color=blue]
>[color=green]
>> 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.[/color]
>
> Code? Have you tried removing the "@" error-suppressing character from
> the function calls and letting PHP tell you it thinks the problem is?
>
> ---
> Steve
>[/color]


Steve
Guest
 
Posts: n/a
#4: Dec 5 '05

re: problem with ftp_put and ftp_get


[color=blue][color=green]
> > Code? Have you tried removing the "@" error-suppressing character from
> > the function calls and letting PHP tell you it thinks the problem is?[/color][/color]
[color=blue]
> I tried, but it doesn't work, echo gives nothing.[/color]

Odd. Have you enabled error reporting and display?

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


---
Steve

Alex
Guest
 
Posts: n/a
#5: Dec 6 '05

re: problem with ftp_put and ftp_get


insert it, same result

"Steve" <googlespam@nastysoft.com> wrote in message
news:1133821942.509141.135330@o13g2000cwo.googlegr oups.com...[color=blue]
>[color=green][color=darkred]
>> > Code? Have you tried removing the "@" error-suppressing character from
>> > the function calls and letting PHP tell you it thinks the problem is?[/color][/color]
>[color=green]
>> I tried, but it doesn't work, echo gives nothing.[/color]
>
> Odd. Have you enabled error reporting and display?
>
> ini_set('error_reporting', E_ALL);
> ini_set('display_errors', TRUE);
>
>
> ---
> Steve
>[/color]


George
Guest
 
Posts: n/a
#6: Dec 9 '05

re: problem with ftp_put and ftp_get


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

Closed Thread