Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Elxis 5.5 Calypso supports 2 factor authentication login with e-mail or SMS.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
Administration
»
Usage of FTP function in admin
« previous
next »
Print
Pages: [
1
]
Author
Topic: Usage of FTP function in admin (Read 20253 times)
yiannos
Jr. Member
Posts: 62
Usage of FTP function in admin
«
on:
November 15, 2006, 12:14:28 »
Could you please tell me (or direct me to where it is mentioned) where the FTP function is used in elxis?
And one suggestion: At the ftp setup page in Administration, it would be usefull to add a "Test" button to check wheter the admin has entered correct credentials and ftp address.
TIA
Logged
Yiannos
http://www.readiness.gr
datahell
Elxis Team
Hero Member
Posts: 10353
Re: Usage of FTP function in admin
«
Reply #1 on:
November 15, 2006, 12:38:15 »
FTP function is used everywhere in Elxis! For handling files in Elxis we have created a class named
File Manager
which is globally accessible under the object name
fmanager
and is located in Elxis
Core
. File manager has internal check routines to determine if for a requested task will use the normal php functions or will try to perform requested action using FTP.
Example:
Lets say you wish to delete file 'test.txt'
You do this by writing this:
$fmanager->deleteFile('test.txt');
File manager will check if file is writable (so deletable) by php. If yes he will delete it using the php's function
unlink
. If not he will delete it using the
KFTP
class/functions. fmanager connects and disconnects automatically from your ftp account. You don't have to tell him to connect or disconnect. If is connected he keeps the connection open (or sleep), so if he needs it again to not have to login again.
The check for the correct credentials and ftp address is done during the Elxis installation procedure. Maybe we should also add a "Test button" in administration as you proposed although there will be a small security risk there: Someone (not the site owner) could continiously try to guess ftp password using this check function... (ftp username and address are very easy to know).
«
Last Edit: November 15, 2006, 12:49:03 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
datahell
Elxis Team
Hero Member
Posts: 10353
Re: Usage of FTP function in admin
«
Reply #2 on:
November 15, 2006, 12:46:24 »
If you wish you can create a small Elxis tool that will do this check for you.
You can also very easy check if Elxis is connected/uses ftp by checking the output of this:
$fmanager->useftp;
Note: the value above depends on the requested task and file's/directory's permissions
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
Administration
»
Usage of FTP function in admin