I have a problem with getting the filebrowser to work. I have done these changes described to modules/fckeditor/fckeditor/editor/filebrowser/connectors/php/config.php:
global $Config ;
// 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'] = '/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'] = '/files/' ;
I have created a directory called "files" in the site root and below that "File", "Media", "Flash" and "Image", I have also chown these to 1080 (default for the rest of the files) and chmod to 777.
Everything seems OK, but when i want to upload a picture with fcseditor the first pop-up comes up, but when I press "browse server" and the second pop-up comes up it says: "Error creating folder "files/image/" (Can´t create directory)"
If I instead try to upload a picture in the first pop-up I get: "Error creating folder "files/" (Can´t create directory).
These directories are already created by me, so what is happening?
My config is:
Drupal 6 RC2
CFKEditor 2.5.1
PHP 4.3.11
Hope someone can help me out!
/Micke
Comments
Comment #1
wwalc commentedPlease set the UserFilesAbsolutePath to the absolute server path.
So this one is probably incorrect:
The right path should look as follows:
or
..or something like that.
Comment #2
mwitt commentedThanks, problem solved!
/Micke
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #4
giorgoskSorry for reopening this
I figured its best to have all the issues relating to the filebrowser in one place
my problem is that I can't see the "browse server" button on IE6
firefox is fine
any body has any solution to that ?
Comment #5
ratinakage commentedHi,
In reference to your answer above, I am hoping it can help me. I have the exact same problem but I don't know what to put into the $Config['UserFilesAbsolutePath'] value?
My drupal site is http://www.example.org.za/community. Note at the moment, the site doesn't work without "www"... What would I put there? I can't seem to figure it out. Everything I put in gives the same error message...
Thanks!
G
Drupal 5.7
Comment #6
giorgoskI think you should put something like this
"/fullpath/to/public_html/community/images"
or try something like this
$_SERVER["DOCUMENT_ROOT"]. "/community/images"
Comment #7
ratinakage commentedHi there,
Thanks for your response, but I am still having problems with this. Perhaps you can be slightly more explicit.
I have created a folder called 'files'. In FileZilla FTP, it comes up like this: "/public_html/community/files/". In that I created four folders. "File", "Media", "Flash" and "Image". I did use caps for the names, as I saw in the message above from mwitt. Am I supposed to?? I gave each of these 777 access.
In my config file, I put the following:
The exact error message I get when I click Browse Server is...
Error creating folder "$_SERVER["DOCUMENT_ROOT"]. "/community/files"image" (Cant create $_SERVER["DOCUMENT_ROOT"]. "directory)
So, then this made me think, perphaps I still need to put a / at the end which I did as you can see here:
Then, the exact error message I get when I click Browse Server is...
Error creating folder "$_SERVER["DOCUMENT_ROOT"]. "/community/files/"image" (Cant create $_SERVER["DOCUMENT_ROOT"]. "directory)
What is the problem here...? I have messed around quite a bit. Sometimes, I am able to upload a file but not to see it or something else goes wrong. Perhaps I am getting it just slightly wrong. My php is not very good.
Please let me know if you can figure it out. Thanks!
G
Comment #8
giorgoskFirst of all let me say that myself I am not even getting the "browse server" button
but this part I know is right
get rid of the outer single quotes and it should be fine
$Config['UserFilesAbsolutePath'] = $_SERVER["DOCUMENT_ROOT"]. "/community/files/";
$_SERVER["DOCUMENT_ROOT"] is a variable and should not be enclosed in quotes
Comment #9
ratinakage commentedThanks!! You solved my problem!! I entered it exactly as you said. I can browse server, upload files etc (in Firefox and Internet Explorer)!! And they come up in the right place when I look in the FTP client.
My configuration:
The problem:
I can't see the pictures. If I navigate to the place where they should be: http://www.example.org.za/community/files/example.jpg, in my browser, I see the image. But in the story itself, I see nothing.
I took a look at the raw generated html. Where the picture should be, I see the following:
So, it make sense that I can't see it. Since, the browser probably thinks the file is at http://www.example.org.za/community/node/17/files/image/example.jpg
Have I still got some configuration problem?
Thanks,
G
Comment #10
dean.p commentedI'm having similar trouble. No matter what I do, I cannot get the filebrowser to work. I'm testing on my local server, Clean URL's disabled (using php installed with IIS so clean URLS are a no go). I'm sure the absolute path is correct:
// Path to user files relative to the document root.
$Config['UserFilesPath'] = "/sites/default/files/" ;
$Config['UserFilesAbsolutePath'] = $_SERVER["DOCUMENT_ROOT"]."/sites/default/files/" ;
The editor works but theres no "browse server" button and there is no "upload" tab in the 'Insert/Edit Image' pop-up.
Even if I set permissions for anonymous user to use fckeditor and upload file permission. One instruction in the readme I'm a bit confused about though:
3. Grant permissions for use of FCKeditor in Administer > User Management > Access Control
Is that a statement or an instruction? In Drupal 6 RC3 there is no menu item labeled 'Access Control', there is 'Access rules' but doesn't seem to apply. I have gone into the 'Permissions' and ticked all the fckeditor module boxes.
Comment #11
ratinakage commentedErm,
Did you remember to edit the FKCeditor profile? There you chose which roles can use a particular profile. Then further down the page, under file browser settings, you need to set Allow basic file management and Allow advanced file management to true. Then you should see the browse server button.
As for my problem, I still don't see the files I upload, but at least the upload and file browser seem to kinda work....
Comment #12
wwalc commentedratinakage: try changing the
$Config['UserFilesPath']to "/community/files/" - this is the right path relative to the document root.Comment #13
ratinakage commentedIt works! Thanks...! :D
For anyone that reads this, here's my working configuration:
Cheers,
G
Comment #14
dean.p commentedAh yes, a little confusing but I found that if "Edit FCKeditor profile > Filebrowser settings > Allow advanced file management:" is set to true, you will not see a 'browse server' button for viewing images.
However, if you have "Allow basic file management:" set to false you won't see either the 'browse server' button or the 'Upload' tab.... so you need both set to true (I thought you set either one or the other to true).
Edit: although now it's behaving itself with "Allow basic file management:" set to false, I still see the 'Browse server button'... weird, maybe a cache thing :p
Also, my config is now:
$Config['UserFilesPath'] = '/sites/default/files/' ;
$Config['UserFilesAbsolutePath'] = 'C:\\Inetpub\\wwwroot\\thesalt\\sites\\default\\files\\';
Thanks for the help :)
Update: Interesteing, on the 'Live' server, I had to change the absolute path to the following to get the browser to work otherwise I was getting urls using "/" and "\" in the same url. Prehaps there might not have been a problem in IE which automatically rewrites the slashes if they are wrong but not in Firefox:
$Config['UserFilesAbsolutePath'] = '/usr/local/www/vhosts/thesalt.org.nz/httpdocs/sites/default/files/';
Comment #15
wwalc commentedConfiguring the file browser should be a bit easier as of now (6.x-1.1).
Comment #16
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #17
jerwilkins commentedEDIT: This is actually the latest from the Drupal 5.x branch, not the version that started this thread. If it's a new and wholly separate issue, please let me know.
Also having serious trouble with the filebrowser. I always get "This file uploader is disabled. Check editor/filemanager/connectors/php/config.php
I've made sure the /files/ directory (server root) is 777'd (for testing), the user I'm using has access to the file browser permission, etc.
Thoughts?
Here's my config:
Comment #18
Billy Chimpson commentedHi,
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 !
Comment #19
Billy Chimpson commentedGot it !
You get the right absolute path if you create a file (for example path.php) in the
folder of your config.php file:
For example:
modules/fckeditor/fckeditor/editor/filemanager/connectors/php/path.php
in this file you save the following short php code:
echo $_SERVER['DOCUMENT_ROOT'];execute the file by your browser by typing in the domain of your site and the path to the file:
For example:
yourdomain.de/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/path.php
you will get the right absolute path of your root-domain:
For example:
/home/your_root_domain/htdocs
FCKEditor config.php ( MULTI SITE) :
$Config['UserFilesPath'] = '/sites/your subdomain/files/';
$Config['UserFilesAbsolutePath'] = '/home/your_root_domain/htdocs/sites/your_sub_domain/files/' ;
The Drupal FCKEditor File Browser Configuration should look like this:
Allow basic file management:
Allow quick uploads.
Allow advanced file management:
Allow file management in the advanced file manager.
Path to uploaded files:
%f/
Path to uploaded files relative to the document root.
%d/files/
I hope you have less problems with this then me!
David
Comment #20
wwalc commented@jerwilkins: check sites\default\settings.php
Uncomment the
$cookie_domain =line and set the $cookie_domain variable.Logout and login again and check whether it worked out for you.
Comment #21
Jorrit commentedPlease reopen if the problem still exists.