Hi,
i have a problem with the FCK Editor.
Can't find the right way to get the file uploader working correctly.
My Drupal installation looks like this:
/sites/domain1
/sites/domain2
/sites/domain3
/sites/default
/sites/all
modules:
Can't find the right way to get the file uploader working correctly.
My Drupal installation looks like this:
/sites/domain1.de
/sites/sub.domain2.de
/sites/sub.domain3.de
/sites/default
/sites/all
the modules are here:
/sites/domain1.de/modules/fckeditor
/sites/sub.domain2.de/modules/fckeditor
/sites/sub.domain3.de/modules/fckeditor
/sites/default
path to the config.php:
modules/fckeditor/fckeditor/editor/filemanager/connectors/php/config.php
path to the files should be:
sub.domain2.de/files/
Whats the right path for
$Config['UserFilesPath'] =
$Config['UserFilesAbsolutePath'] =
I tried nearly everything but nothing worked...
Please HELP !
Comments
Comment #1
Billy Chimpson commentedGot it !
$Config['Enabled'] = true ;
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/sites/'.$_SERVER["SERVER_NAME"].'/files/';
// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '/home/mydomain/htdocs/sites/'.$_SERVER["SERVER_NAME"].'/files/' ;
I hope you have less problems with this than me!
David
Comment #2
drasgardian commentedI'm not sure if this is exactly the same problem, but it may help you or someone else.
I've got a multi-site drupal install and because there are several users working on drupal sites, the sites/ folder contains symlinks to the site-specific files in various users's home directories.
filemanager-config.php has a line that looks like this
whch is used when trying to find the bootstrap.inc file.
This of course wasn't working because of my symlinks, so I changed that line to this
and now it works fine.
I didn't need to change the $Config['UserFilesPath'] and $Config['UserFilesAbsolutePath'] as the paths are picked up from what is configured within the drupal fckeditor configuration.
Comment #3
wwalc commentedcrashovermind:
You should avoiding this setting:
this is really a strong security risk.
Try including filemanager.config.php as the readme says, check users permissions, fckeditor profile and so on.
If it still doesn't work, then the problem may be in finding the path by filemanager.config.php (thanks to drasgardian for pointing this issue out).
Try to set the $drupal_path in the filemanager.config.php to the absolute server path to your drupal installation, e.g:
/home/login/public_html/drupal/.Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #5
scarer commentedI used sym links for my drupal multisite install so I had to do something like this instead:
$string = $_SERVER['REQUEST_URI'];
$strings = explode("/", $string);
// SECURITY: You must explicitly enable this "connector". (Set it to "true").
// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
// authenticated users can access this file or use some kind of session checking.
$Config['Enabled'] = true ;
// Path to user files relative to the document root.
//$Config['UserFilesPath'] = '/sites/'. $_SERVER['SCRIPT_NAME'] .'/files/';
$Config['UserFilesPath'] = '/sites/myservername.' . $strings[1] .'/files/';
Comment #6
sprior commentedI think a MUCH safer thing to do (though still pretty much a hack) is to modify sites/all/modules/fckeditor/filemanager.config.php in the CheckAuthentication function. Right above the final:
if (!isset($bootstrapFileFound) || ($bootstrapfilefound) {
Put the following:
if (!isset($bootstrapFileFound) || ($bootstrapfilefound) {
$drupal_path= "path_to_drupal_install"; // OR code to figure out what it is maybe from the __FILE__ constant
$bootstrapFileFound = file_exists($drupal_path . "/includes/bootstrap.inc");
}
Then you can follow the regular instructions for putting the include in fckeditor/editor/filemanager/connectors/php/config.php
By doing this you won't be hardcoding $Config['Enabled'] = true ; which is a security problem.