PhpList 3.x CKEditor/kcfinder setup

Love the new v3, thanks for your work on this.

I don’t seem to be able to get kcfinder to work within CKEditor.

Here’s my config

I am using the plugin in the admin folder.
My images/News folder is in the public_html root as is the lists directory. I.E., they are beside each other.

/images/News
/lists

When I try to Browse Server for images from within CKEditor I get a 403.

Wondering if my configuration is correct?
I know I can whitelist that particular rule, but before I do that I wanted to know if you’ve seen that error and have any ideas.

Have you followed the guidance at plugin:ckeditor [phpList Resources]

Thanks, yes I’ve followed the guidance, and no matter what I can’t get “Browse Server” to return anything other than 404s or 403s.

Copied the images folder inside /lists, moved plugins beside it (out of admin). Doesn’t matter.

Is a 404 telling me kcfinder can’t find the images/News directory?

@jimlongo You will need to show the values from the Settings page, and the value of UPLOADIMAGES_DIR in config.php.

Thanks, this gives me a 404 when I select Browse Server.

define(‘UPLOADIMAGES_DIR’, ‘…/images’);

Path to KCFinder : plugins/CKEditorPlugin/kcfinder
File system path to the upload image directory. Usually leave this empty. : images
Name of the image subdirectory of the file upload directory : News
Name of the files subdirectory of the file upload directory : files
Name of the flash subdirectory of the file upload directory : flash

@jimlongo You don’t seem to have understood the guidance on the plugin’s documentation page and in config. file.

UPLOADIMAGES_DIR must be relative to the web root directory, so what do you mean by “…/images”?

Why have you entered a value for “File system path to the upload directory. Usually leave this empty”?

But a 404 error on clicking Browse Server probably means that you have moved the plugin files. The plugin usually works straightaway if you just accept the default settings. Have you moved the plugin files?

Your original problem seems to be caused by mod_security objecting to the directory navigation possibly due to you using “…/images”.

@jimlongo If you have left the plugin files where they originally were then, based on your earlier replies, these settings should work

define(“UPLOADIMAGES_DIR”, ‘images’);

“Path to kcfinder”: plugins/CKEditorPlugin/kcfinder

and leave empty the setting for “File system path to the upload image directory. Usually leave this empty.”

Thanks,

Yes I had tried that previously, and that is the way I have set it now.
I haven’t moved the plugins directory, and the CKEditor plugin does load.
The images directory is in the webroot (/public_html)
I get a 404 when I click “Browse Server”

Path to KCFinder : plugins/CKEditorPlugin/kcfinder
File system path to the upload image directory. Usually leave this empty. :

define(“UPLOADIMAGES_DIR”, ‘images’);

@jimlongo So the mod_security error now does not happen?

When you click Browse Server a new window should open. Is that the one that has the 404 error? What is the url in the browser address bar?

No I’m no longer getting a mod_security error.

When I click Browse Server I’m getting a 404 WordPress error page in the new window that opens, the address bar has 404.shtml in it.

The phpList installation is in public_html/newslist, the WordPress site is in public_html.

@jimlongo Can you see that this file exists

admin/plugins/CKEditorPlugin/kcfinder/.htaccess

Otherwise look in the web server log to see if there is anything about why the page is not being found. The url being requested should be

wanlesstennis.com/newslist/admin/plugins/CKEditorPlugin/kcfinder/browse.php

The contents of admin/plugins/CKEditorPlugin/kcfinder/.htaccess

    <FilesMatch "\.php$">

# Apache < 2.3
    <IfModule !mod_authz_core.c>
        Order allow,deny
        Allow from all
        Satisfy All
    </IfModule>

# Apache ≥ 2.3
    <IfModule mod_authz_core.c>
        Require all granted
    </IfModule>
    </FilesMatch>

Unfortunately nothing relevant in the logs that I can find.

In your first post, you say that the phplist installation is in the /lists directory, yet in a later post you say its in /newslist These need to match

@jimlongo @Dragonrider It appears that /lists and /list are redirected to /newslist which might explain some of the earlier inconsistency.

But now accessing http://wanlesstennis.com/newslist/admin/plugins/CKEditorPlugin/kcfinder/browse.php works (or at least is displays an error box that is produced by kcfinder), so I guess something has been changed.

Sorry for the generic /lists in the first post.

PhpList is in /newslist
CKEditor (and kcfinder) loads from the /newslist/admin/plugins directory
I have /images and a have put a copy in /newslist/images (so have tried both in config).

I’m sorry if there’s any confusion it’s because I’ve tried every combination I could conceive.

This is the current setup
Path to KCFinder : plugins/CKEditorPlugin/kcfinder
File system path to the upload image directory. Usually leave this empty. :

define(“UPLOADIMAGES_DIR”, ‘images’);

@jimlongo In my previous reply I pointed out that the url for kcfinder is working when accessed directly

http://wanlesstennis.com/newslist/admin/plugins/CKEditorPlugin/kcfinder/browse.php

That is the url that should be requested when you click the Browse Server button. If the 404 error is still happening then you need to find which url is being rejected from the web server logs.
Can you try that url directly when signed-in to phplist?

Possibly there are some other .htaccess files that disallow that url when signed-in to phplist, but I can’t really suggest where they might be.