ftp-directory included in website

Permalink
hey guys,

is there a nice way to include a ftp directory into my concrete5 website, where people can download things?

thanks!!

dorferc
 
kino replied on at Permalink Reply
kino
you need "download folder" ?

I think the following add-ons
http://www.concrete5.org/marketplace/addons/download_folder/...
dorferc replied on at Permalink Reply
dorferc
yes thanks, something like that but for an external ftp server (the ftp server and the server where my website runs have different IPs)
kino replied on at Permalink Reply
kino
dorferc replied on at Permalink Reply
dorferc
that is a possible way but since the server I am using for the website is a public server at my university i don´t really have the rights to use such things.

i would like to add my ftp directory like a content block to my site..
kino replied on at Permalink Best Answer Reply 1 Attachment
kino
I made it because it was fun.
dorferc replied on at Permalink Reply
dorferc
thank you so much!!
but I do get an error message:

Warning: ftp_connect() [function.ftp-connect]: php_network_getaddresses:getaddrinfo failed: Name or service not known in ...../packages/kino_ftp_directory/models/kino_ftp_directory.php on line 11
ftp connection error

any ideas?

Thanks,
Christian
kino replied on at Permalink Reply
kino
hostname field is only hostname.
ex.) ftp.tktools.jp
dorferc replied on at Permalink Reply
dorferc
yeah, I tryed that too.
then it says: ftp connection error
maybe it´s because of the university server, i don´t know..
would you try it for me?
the adress of the ftp server is: 193.238.157.4:2100
user anonymous/no pw set
kino replied on at Permalink Reply
kino
port number is '21'.

if you want change .
/packages/kino_ftp_directory/models/kino_ftp_directory.php
line 9,40
$ftp_port = 21;
kino replied on at Permalink Reply 1 Attachment
kino
Updated.

Add input for port.
dorferc replied on at Permalink Reply
dorferc
ok, now the programm connects to the ftp server, but it can´t open data connection. here is what filezilla says:

000049)06.03.2011 16:34:44 - (not logged in) (193.170.75.21)> Connected, sending welcome message...
(000049)06.03.2011 16:34:44 - (not logged in) (193.170.75.21)> USER anonymous
(000049)06.03.2011 16:34:44 - (not logged in) (193.170.75.21)> 331 Password required for anonymous
(000049)06.03.2011 16:34:44 - (not logged in) (193.170.75.21)> PASS
(000049)06.03.2011 16:34:44 - anonymous (193.170.75.21)> 230 Logged on
(000049)06.03.2011 16:34:44 - anonymous (193.170.75.21)> PORT 193,170,75,21,157,28
(000049)06.03.2011 16:34:44 - anonymous (193.170.75.21)> 200 Port command successful
(000049)06.03.2011 16:34:44 - anonymous (193.170.75.21)> NLST /
(000049)06.03.2011 16:34:44 - anonymous (193.170.75.21)> 150 Opening data channel for directory list.
(000049)06.03.2011 16:34:54 - anonymous (193.170.75.21)> 425 Can't open data connection.
(000049)06.03.2011 16:35:29 - anonymous (193.170.75.21)> QUIT
(000049)06.03.2011 16:35:29 - anonymous (193.170.75.21)> 221 Goodbye
(000049)06.03.2011 16:35:29 - anonymous (193.170.75.21)> disconnected.

I know that I´m a pain in the neck but it has to work! ;D



Update:
Ok now I installed the last version you posted (0.2) I set the port in the user interface to 2100 and the other time to input, still the same as above (another time i also changed the port in the script, still didn´t work..)
kino replied on at Permalink Reply 1 Attachment
kino
OK.
Updated.

I think need pasv mode.

try this.
dorferc replied on at Permalink Reply
dorferc
allright! now it does work!!
is there also a way to display folders and not only files (it just shows me info.txt but no folders)?
kino replied on at Permalink Reply
kino
show only files .

folders is no display.
dorferc replied on at Permalink Reply
dorferc
is there a way to?
kino replied on at Permalink Reply
kino
Did not make the process corresponding to the folder to see it too.
kino replied on at Permalink Reply 1 Attachment
kino
Updated.

add show folders setting.
and
add folder move action.
dorferc replied on at Permalink Reply
dorferc
now everything works perfekt!!;)
except: I do have a info.txt on my ftp server, if I download it via ftp everythink is ok, but if I donwnload/open it via your script there´s nothing of the original text in the file left and the txt-file is filled up with parts of the script...

if everything works you should sell it!!
I would buy it! ;)
kino replied on at Permalink Reply
kino
Is tested here(http://c7.tktools.jp/ ).
I do not see a problem.

Pleas send me problem file.
dorferc replied on at Permalink Reply
dorferc
the text in my info.txt is:

<br />
<b>Warning</b>: ftp_get(/users/home45/e0928345/public_html/files/tmp/9f2d4f38237962835d587fe9454191c5.tmp) [<a href='function.ftp-get'>function.ftp-get</a>]: failed to open stream: No such file or directory in <b>/users/home45/e0928345/public_html/packages/kino_ftp_directory/models/kino_ftp_directory.php</b> on line <b>53</b><br />
<br />
<b>Warning</b>: ftp_get() [<a href='function.ftp-get'>function.ftp-get</a>]: Error opening /users/home45/e0928345/public_html/files/tmp/9f2d4f38237962835d587fe9454191c5.tmp in <b>/users/home45/e0928345/public_html/packages/kino_ftp_directory/models/kino_ftp_directory.php</b> on line <b>53</b><br />
<br />
<b>Warning</b>: filesize() [<a href='function.filesize'>function.filesize</a>]: stat failed for /users/home45/e0928345/public_html/files/tmp/9f2d4f38237962835d587fe9454191c5.tmp in <b>/users/home45/e0928345/public_html/packages/kino_ftp_directory/models/kino_ftp_directory.php</b> on line <b>59</b><br />
<br />
<b>Warning</b>: fopen(/users/home45/e0928345/public_html/files/tmp/9f2d4f38237962835d587fe9454191c5.tmp) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory in <b>/users/home45/e0928345/public_html/packages/kino_ftp_directory/models/kino_ftp_directory.php</b> on line <b>68</b><br />

no original text left...
kino replied on at Permalink Reply
kino
OK.

check /users/home45/e0928345/public_html/files/tmp/
permission .

Written permission is required.
You must periodically delete the *.tmp files in that directory.
dorferc replied on at Permalink Reply
dorferc
I think I don´t have these files. (Theres is no tmp folder in the files folder.)
Do may have an idea to get an permanent solution (I could try to speak to the server administrator..)?
dorferc replied on at Permalink Reply
dorferc
hi,

just found/"solved" the problem...
there was no tmp directory in /files/ so I just made one and everything works perfect now!
just one problem left: your script downloads all the files into this tmp folder - so it gets bigger and bigger (do have limited space - 300mb, but about 300 downloads a day), could you add an automatic-delete function after file has been downloaded?

thx and greetings from austria!