Hi
I'm sorry to be posting another file browser problem, but I done numerous searches and I still cannot get the FCK filemanager/browser working in PHP, using FCK version 2.4.2.
I am using a .htaccess file to modify the include path across the whole site, so I do have to rewrite rule to get paths correct for images and other things. As far as I can tell this shouldn't be a problem due to what is in the /editor/filemanager/browser/default/connectors/php/config.php file...
// Path to user files relative to the document root. $Config['UserFilesPath'] = '/userfiles/' ; // Fill the following value it you prefer to specify the absolute path for the // user files directory. Usefull 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'] = '/userfiles/' ;
So if I set $Config['UserFilesAbsolutePath'] = '/userfiles/' ; to $Config['UserFilesAbsolutePath'] = '/absolute/path/to/my/site/userfiles/' ; that should set the absolute file path and everything should be good. I also assume that $Config['UserFilesPath'] needs to be set to exactly the same value.
The problem is when I open the file browser I get the error "The server didn't send back a proper response. Requested URL: http://my/site/connector/php/connector.php?Command=GetFolderAndFiles&Type=Image&CurrentFolder=%2f". However when I upload a file it ends up in the userfiles directory, so that's working.
When I use the test.html in the connectors directory I just get an "Access Denied" error for the directory using the absolute path.
As I said I've done lot's of searches, tried lots of different options, but with no luck
Any help is greatly appreciated, thanks in advance!
Re: File Browsing Problem
Re: File Browsing Problem
Could you please provide more details regarding that problem?
What's your document root (run phpinfo(); and search for DOCUMENT_ROOT), where is your "userfiles" directory?
What do you see when you open that link which is showing up in error message?
(http://my/site/connector/php/connector. ... Folder=%2f)
If DOCUMENT_ROOT is /path/to/dirX/ and you placed your files inside /path/to/dirX/userfiles/
then set $Config['UserFilesPath'] to /userfiles/
and $Config['UserFilesAbsolutePath'] to /path/to/dirX/userfiles/
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: File Browsing Problem
Thanks for the reply Wiktor...
DOCUMENT_ROOT /var/www/html
SCRIPT_FILENAME /var/www/html/my/site/phpinfo.php
The userfiles is: /var/www/html/my/site/userfiles
The result of opening the URL in the error message (http://my/site/connector/php/connector.php?Command=GetFolderAndFiles&Type=Image&CurrentFolder=%2f) is...
Even though that is well formed XML it seems obvious that the paths are incorrect...
UPDATE: Of course, from the Xml it's looking for url="/userfiles/image/", which doesn't exist. Once I had the absolute path right, and created the image directory it is working perfectly.
Again, thanks, glad to be at the bottom of it!