• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stupid FTP Grr

#11
[eluser]coolfactor[/eluser]
Here is the relevant code from v1.5.4's FTP class:

Code:
if ( ! file_exists($locpath))
        {
            $this->_error('ftp_no_source_file');
            return FALSE;
        }

You're passing "/public_html/tmp/782c5f1954255628bb10c26d8a4597f.flv' into that $locpath variable, but I doubt your "public_folder" is at the root of your volume?

Try passing in an absolute path in as that first parameter.

#12
[eluser]Phil Sturgeon[/eluser]
Now I feel stupid. When you connect to your local server via FTP, you take the FTP root which is the folder above /public_html/. When you are connect to a different server, your local path is the WEB path or a relative one. So ./tmp/ or /home/username/public_html/tmp will work... DOH!

upload and download now work fine, thanks once again coolfactor. Will send 1% of the budget to the charity of your choice! :p

#13
[eluser]nikolajcz[/eluser]
Hi, I've found this thread while looking for solution of the same problem.

Trying to upload file with simple code like this...
Code:
$this->ftp->upload('/1.mp3', '1.mp3');
keeps show me the same error message about wrong local source path recommending me to check it.
While 1.mp3 file is in my root folder (i'm working on mac os x).

i really don't understand, where could be the mistake.

#14
[eluser]coolfactor[/eluser]
[quote author="nikolajcz" date="1186596677"]Hi, I've found this thread while looking for solution of the same problem.

Trying to upload file with simple code like this...
Code:
$this->ftp->upload('/1.mp3', '1.mp3');
keeps show me the same error message about wrong local source path recommending me to check it.
While 1.mp3 file is in my root folder (i'm working on mac os x).

i really don't understand, where could be the mistake.[/quote]

nikoljcz, the first parameter to the upload() function needs to be either:
- a relative path (not starting with a slash)
-or-
- a full, absolute path starting at the root of your disk drive

The path you're using ('/1.mp3') says to look for a file at the root of your disk drive called "1.mp3", but I doubt that is where you have it.

#15
[eluser]nikolajcz[/eluser]
coolfactor,
it seems to me that i've checked everything, but still excuse me for my lameness.

The file 1.mp3 is copied to the root of my hard drive. I did this to ease up checking for correctness of my path. If i type /1.mp3 in Safari it works great. But if I use /Volumes/disk/1.mp3 or plain simple /1.mp3 (with or without the starting slash - it just doesn't matter) it doesn't work.

Will keep working on this one and try to find the way around somehow.

#16
[eluser]coolfactor[/eluser]
Have you named your hard drive "disk"?

#17
[eluser]nikolajcz[/eluser]
But of course... :-) I'm not sure if I was clear in my last post, but I mean also the /Volumes/disk/1.mp3 works in Safari url line. Confusing...


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.