Re: ftp_get() problem
| From: | Tijnema | Date: | Fri, 22 Jun 2007 17:35:41 +0000 |
| Subject: | Re: ftp_get() problem | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-257667@lists.php.net to get a copy of this message | ||
On 6/22/07, Phil Curry <pmcurry@gmail.com> wrote:
Oops forgot that part. Yes If I use an ftp client or just command line ftp I can get the file. That's why I thought it must be my code. -Phil CurryAnd what about the local file? Does PHP has the rights to create the local file? Does this work: file_put_contents($destination, "Test string to write"); You could also try to set $destination to somewhere in /tmp, because it's 99% guaranteed that PHP has write access there :) Tijnema ps. Please don't top post
On Jun 22, 2007, at 10:19 AM, Tijnema wrote: On 6/22/07, Phil Curry <pmcurry@gmail.com> wrote:-- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.infoWhen you go to this server with some FTP software (or just your browser), and log in etc. Can you download the file then? Seems like a permission problem to me... Tijnema -- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.infoNew to php and this list. Googled a lot and scoured newsgroups to no avail. So now I'm here looking for an answer. Here's my offending line:$gotFile = ftp_get( $connection, $destination, $source,FTP_BINARY ); Just prior to execution all parameters have valid values. The following error is reported:Warning: ftp_get() [function.ftp-get]: Error openingiPhoneRingTone.mp3 in /Users/b1ueskyz/Sites/pmcRoutines.php on line 91 Using the same parameters I am able to successfully ftp_put(), ftp_rename(), and ftp_delete()the file. I just can't 'get' it. Any help or direction is greatly appreciated. -Phil Curry