Ckeditor and/or phplist difficulty handling .subdomains, it seems

Hello.

What’s wrong with this picture?

ckeditor keeps saying:

The requested URL /home/homedirectory/public_html/news.xxx.com/lists/admin/plugins/CKEditorPlugin/kcfinder/browse.php was not found on this server

I have:

CentOS Linux release 7.6.1810
phplist 3.4.1

cd /home/homedirectory/public_html/news.xxx.com/lists/admin/plugins/CKEditorPlugin/kcfinder

[root@xxx kcfinder]# ls -la browse.php

-rw-r–r--. 1 xxx xxx 590 Apr 25 10:51 browse.php

[root@xxx /]# cd /home/homedirectory/public_html/news.xxx.com/lists/uploadimages/
[root@xxx uploadimages]# ls
files image
[root@xxx uploadimages]# ls -la
total 32
drwxr-xr-x. 5 xxx xxx 4096 Apr 25 10:51 .
drwxr-xr-x. 11 xxx xxx 4096 Apr 25 10:51 …
drwxr-xr-x. 2 xxx xxx 4096 Apr 25 10:51 files
-rw-r–r--. 1 xxx xxx 617 Apr 25 10:51 .htaccess
drwxr-xr-x. 2 xxx xxx 12288 Apr 25 10:51 image
drwxr-xr-x. 4 xxx xxx 4096 Apr 25 10:51 .thumbs

php config.php listings:

define(‘UPLOADIMAGES_DIR’, ‘/home/homedirectory/public_html/news.xxx.com/lists/uploadimages’);

cd /home/homedirectory/public_html/news.xxx.com/lists/admin/plugins/CKEditorPlugin/kcfinder
[root@xxxx kcfinder]# ls -la browse*
-rw-r–r--. 1 xxxx xxxx 590 Apr 25 10:51 browse.php

settings in phplist settings:

Path to KCFinder
/home/homedirectory/public_html/news.xxx.com/lists/admin/plugins/CKEditorPlugin/kcfinder

File system path to the upload image directory. Usually leave this empty.
/home/homedirectory/public_html/news.xxx.com/lists/uploadimages

@pancakehollow You are using file system paths when they should be relative to the web server root directory.
See the explanation in config_extended.php and the ckeditor plugin documentation https://resources.phplist.com/plugin/ckeditor

Thank you. So, for example, in the given examples:

define(‘UPLOADIMAGES_DIR’, ‘/home/homedirectory/public_html/news.xxx.com/lists/uploadimages’);

should change to:

define(‘UPLOADIMAGES_DIR’, ‘/lists/uploadimages’);
and similar in the php.conf file?

I believe I tested that already with negative results, but will check again.

@pancakehollow

define('UPLOADIMAGES_DIR', 'lists/uploadimages');

and
Path to KCFinder
/lists/admin/plugins/CKEditorPlugin/kcfinder
or the default value
plugins/CKEditorPlugin/kcfinder

1 Like

The confusion (at least for me) were the instructions that state:

In some web server configurations the plugin will not be able to correctly derive the file system path to the upload image directory from the value of UPLOADIMAGES_DIR. The plugin will show a message similar to this
Image browsing is not available because directory “/xxx/xxx” does not exist or is not writeable .
If the file system path in the message is wrong but the value of UPLOADIMAGES_DIR is correct, then you can enter the actual file system path that should be used.

My understanding of the phrase “. . . then you can enter the actual file system path that should be used.” was to enter something like “define(‘UPLOADIMAGES_DIR’, ‘/home/homedirectory/public_html/news.xxx.com/lists/uploadimages’);”

My solution was in config.php:

define(‘UPLOADIMAGES_DIR’, ‘/lists/uploadimages’);

and in ckeditor settings in phplist dashboard, was to leave that blank.

that worked.

And that’s exactly what Duncanc suggested.

1 Like