Closed MonkeyOnKeyboard closed 9 years ago
1 - download the last version : https://github.com/simogeo/Filemanager/archive/master.zip 2 - change your user.config.php file with the following instructions :
$folderPath = '/community/include/images/uploads/userfiles/' . $_SESSION['userfoldername'].'/';
$fm = new Filemanager();
$fm->setFileRoot($folderPath, true);
Note the new parameter on setFileRoot() method. It will allow you to create folder if it does not exists.
3 - you're done.
Please re-open if not ok
Ive done the changes but. the filemanager ignores the user.config.php filemanager shows only / but its wrong in user.config.php the path is present. whats going wrong
filemanager shows only / but its wrong in user.config.php the path is present.
This is normal behaviour. The FM won't display the full path to user folder when using setFileRoot()
. But it will work on the given folder. You can have a look to the passed parameter (path) under your explorer to be sure.
By the way, I would give you the advice to get the latest version again - I just fixed a bug (I guess).
ok i will show it in next hour at the moment i put 171 smilys manuel to ckeditor ;-)
what must i insert for paths and variables? should it ok? if i set only the path in user.config.php?
"serverRoot": false,
"fileRoot": "/",
"logger": true,
For the last instruction, see : https://github.com/simogeo/Filemanager/wiki/Filemanager-configuration-file#the-options-section.
Using, logger
, and logfile
keys , you will be able to see the full path value in your logfile.
and in your user.config.php file, as said above :
$folderPath = '/community/include/images/uploads/userfiles/' . $_SESSION['userfoldername'].'/';
$fm = new Filemanager();
$fm->setFileRoot($folderPath, true);
So it wont work. he stays in / dir and no in userdir in /include/images/uploads/userfiles/
he ignores the user.config.php
<?php /**
session_start ();
$folderPath = '/include/images/uploads/userfiles/' . $_SESSION['userfoldername'].'/'; $fm = new Filemanager(); $fm->setFileRoot($folderPath, true);
/**
*
function auth() { // You can insert your own code over here to check if the user is authorized. // If you use a session variable, you've got to start the session first (session_start()) return $_SESSION['authright'] <= -3;
}
// @todo Work on plugins registration // if (isset($config['plugin']) && !empty($config['plugin'])) { // $pluginPath = 'plugins' . DIRECTORY_SEPARATOR . $config['plugin'] . DIRECTORY_SEPARATOR; // require_once($pluginPath . 'filemanager.' . $config['plugin'] . '.config.php'); // require_once($pluginPath . 'filemanager.' . $config['plugin'] . '.class.php'); // $className = 'Filemanager'.strtoupper($config['plugin']); // $fm = new $className($config); // } else { // $fm = new Filemanager($config); // }
// we instantiate the Filemanager $fm = new Filemanager();
?>
of course you instantiate it twice.... *Remove your last line+ :
// we instantiate the Filemanager
$fm = new Filemanager();
ok first problem solved, but he didnt create userfolder like username for example
To see what's happening, enable logging : https://github.com/simogeo/Filemanager/wiki/Enable-log-debug-in-PHP-connector, access your FM from browser and past log content.
[17/08/2015 08:34:37]#217.228.253.185#Filemanager::enableLog - Log enabled (in /tmp/filemanager.log file) [17/08/2015 08:34:37]#217.228.253.185#Filemanager::construct $this->root value /var/www/vhosts/caelum-et-infernum.eu/httpdocs/include/includes/filemanager/ [17/08/2015 08:34:37]#217.228.253.185#Filemanager::construct $this->path_to_files /var/www/vhosts/caelum-et-infernum.eu/httpdocs// [17/08/2015 08:34:37]#217.228.253.185#Filemanager::construct $this->doc_root value /var/www/vhosts/caelum-et-infernum.eu/httpdocs [17/08/2015 08:34:37]#217.228.253.185#Filemanager::construct $this->separator value [17/08/2015 08:34:37]#217.228.253.185#Filemanager::setFileRoot $this->doc_root value overwritten : /var/www/vhosts/caelum-et-infernum.eu/httpdocs/include/images/uploads/userfiles/ [17/08/2015 08:34:37]#217.228.253.185#Filemanager::setFileRoot $this->dynamic_fileroot value /include/images/uploads/userfiles/ [17/08/2015 08:34:37]#217.228.253.185#Filemanager::setFileRoot $this->path_to_files /var/www/vhosts/caelum-et-infernum.eu/httpdocs/include/images/uploads/userfiles/ [17/08/2015 08:34:37]#217.228.253.185#Filemanager::setFileRoot $this->separator value userfiles [17/08/2015 08:34:37]#217.228.253.185#substr path_to_files : /var/www/vhosts/caelum-et-infernum.eu/httpdocs/include/images/uploads/userfiles/ [17/08/2015 08:34:37]#217.228.253.185#path_to_files : /var/www/vhosts/caelum-et-infernum.eu/httpdocs/include/images/uploads/userfiles/ [17/08/2015 08:34:37]#217.228.253.185#Filemanager::enableLog - Log enabled (in /tmp/filemanager.log file) [17/08/2015 08:34:37]#217.228.253.185#Filemanager::construct $this->root value /var/www/vhosts/caelum-et-infernum.eu/httpdocs/include/includes/filemanager/ [17/08/2015 08:34:37]#217.228.253.185#Filemanager::construct $this->path_to_files /var/www/vhosts/caelum-et-infernum.eu/httpdocs// [17/08/2015 08:34:37]#217.228.253.185#Filemanager::construct $this->doc_root value /var/www/vhosts/caelum-et-infernum.eu/httpdocs [17/08/2015 08:34:37]#217.228.253.185#Filemanager::construct $this->separator value [17/08/2015 08:34:37]#217.228.253.185#Filemanager::setFileRoot $this->doc_root value overwritten : /var/www/vhosts/caelum-et-infernum.eu/httpdocs/include/images/uploads/userfiles/ [17/08/2015 08:34:37]#217.228.253.185#Filemanager::setFileRoot $this->dynamic_fileroot value /include/images/uploads/userfiles/ [17/08/2015 08:34:37]#217.228.253.185#Filemanager::setFileRoot $this->path_to_files /var/www/vhosts/caelum-et-infernum.eu/httpdocs/include/images/uploads/userfiles/ [17/08/2015 08:34:37]#217.228.253.185#Filemanager::setFileRoot $this->separator value userfiles [17/08/2015 08:34:37]#217.228.253.185#substr path_to_files : /var/www/vhosts/caelum-et-infernum.eu/httpdocs/include/images/uploads/userfiles/ [17/08/2015 08:34:37]#217.228.253.185#path_to_files : /var/www/vhosts/caelum-et-infernum.eu/httpdocs/include/images/uploads/userfiles/
it seems that $_SESSION['userfoldername']
is not passed correctly to folder path because it does not appear in log
yes thats it you cancels the $_SESSION['userfoldername'] thats the problem what i have.
btw. in the session there is no userfoldername the system is ilch and the only one is authname authname|s:10:"MagicMoney";authid|s:3:"118";authright|s:2:"-9";
But if i replace $_SESSION['userfoldername'] with $_SESSION['authname']
its the same, the script ignores the $_SESSION['userfolder'] variable
The script does not cancel / ignore anything .... provide the good variable and it will work correctly.
Refer to ilch support if needed.
Sorry but the $_SESSION['authname'] is the right id. i test it two times with over $_SESSION variables from ilch. the create variable ignores the . $_SESSION so the ticket is not over.
check your apache logfile or just uncomment lines 3-4 in https://github.com/simogeo/Filemanager/blob/master/connectors/php/filemanager.php#L3
You can even try to echo $_SESSION['authname']
in user.config.php to see that it will probably be undefined or as unexpected format (such as array or serialized content ). Maybe with the help of firebug.
FM is free of charge, user coding support is not. Problem is yours, ticket is over.
I've been fooled a couple of time ... Spending time without even a 'thanks word'
sorry but, ive testet all.
so help please....
if activate log but no log was seen. in apache log or so on.
try again, it works well
its defenetly ... the script ignores the variables aufer /'
Remember, you also said before, the script did not read user.config.php file .... But fault was yours
so i testet the link in user.config.php with 2 other uploading scripts, and they work .... its not my fault.. its a fault from your script, what ignores the ' . $_SESSION[""] . '/' variable
but you go the easy way to say its my foult.. nice support...
its a fault from your script, what ignores the ' . $_SESSION[""] . '/' variable
I'd be happy you to explain me why and show me how the script would do that ....
Hello, ive an error doring setup userfolders. i use filebrowser latest version with ilch 1.1p and ckeditor 4.5.x my Problem is, if i make the setup for user.config.php from the turorial, the user dirs wont be create and the filemanager is loading.....
how can i use the filemanager with my configuration from ilch and so on?
<?php /**
session_start();
$folderPath = '/community/include/images/uploads/userfiles/' . $_SESSION['userfoldername'].'/'; $fm = new Filemanager(); $fm->setFileRoot($folderPath);
/**
*
// @todo Work on plugins registration // if (isset($config['plugin']) && !empty($config['plugin'])) { // $pluginPath = 'plugins' . DIRECTORY_SEPARATOR . $config['plugin'] . DIRECTORY_SEPARATOR; // require_once($pluginPath . 'filemanager.' . $config['plugin'] . '.config.php'); // require_once($pluginPath . 'filemanager.' . $config['plugin'] . '.class.php'); // $className = 'Filemanager'.strtoupper($config['plugin']); // $fm = new $className($config); // } else { // $fm = new Filemanager($config); // }
// we instantiate the Filemanager $fm = new Filemanager();
?>
The next is, if its possible:
if an user open the filemanager, that the filmanager looks (if is the userfolder exist -> if not create userfolder)