Installation paths unclear Solved

User's avatar
Rebecca T.
05:07 Mar 12, 2014
I am having trouble installing the CKEditor Quick Image Upload+ plugin. The icon has been added to the CKEditor toolbar and I can open the dialogue box and navigate to a file ok. But when I try to upload, the red circle is replaced with a yellow warning triangle and the file does not upload.
The installation guide is not 100% clear on where to amend the upload path in the config.php file, and I may have the path to the actual uploader wrong in my config.js file also.
For example, exactly where in these lines do I add my own upload file paths in the config.php file?
$config['BaseUrl'] = preg_replace('/(uploader\.php.*)/', 'userfiles/', $_SERVER['PHP_SELF']);
and
$config['BaseDir'] = dirname(__FILE__).'/userfiles/';
and does the path to the php uploader in the config.js file need to be absolute or can it be relative?:
EG
config.doksoft_uploader_url = '/admin/ckeditorfull/plugins/doksoft_uploader/uploader.php';
or
config.doksoft_uploader_url = 'plugins/doksoft_uploader/uploader.php';
neither of the above work.

File permissions are ok, I think I am just struggling with the file paths...
Support team avatar
JS+
06:44 Mar 12, 2014
If you do not want to change the place of plugin's upload directory you can leave this parameters to be defaults. And uncomment lines in `config.php` you have commented.

If you want to change the directory or have some specific paths configuration on the server:
All options in `config.php` affect to server side processing and options in `config.js` help you to specify where the uploader is placed.
I recommend you to use absolute paths wherever it's possible. But in the same time you may try to calculate paths manually (this way can cause mistakes).

For your server configuration I think that correct solution will be this:

In `config.js`:
config.doksoft_uploader_url = '/admin/ckeditorfull/plugins/doksoft_uploader/uploader.php';

In `config.php`:
$config['BaseUrl'] = '/admin/ckeditorfull/plugins/doksoft_uploader/userfiles/ ';$config['BaseDir'] = '/var/www/admin/ckeditorfull/plugins/doksoft_uploader/userfiles/';

Of cause you need to substitute your own values instead of '/var/www/'. Use your web server's root instead.
User's avatar
Rebecca T.
07:26 Mar 12, 2014
Still no luck. I have reverted the config.php paths back to the defaults:
$config['BaseUrl'] = preg_replace('/(uploader\.php.*)/', 'userfiles/', $_SERVER['PHP_SELF']);
$config['BaseDir'] = dirname(__FILE__).'/userfiles/';

This is my config.js file in ckeditor:
CKEDITOR.editorConfig = function( config ) {
	config.toolbarGroups = [
		{ name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
		{ name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
		{ name: 'links' },
		{ name: 'insert' },
		{ name: 'forms' },
		{ name: 'tools' },
		{ name: 'document',	   groups: [ 'mode', 'document', 'doctools' ] },
		{ name: 'others' },
		{ name:'doksoft_image'},
		'/',
		{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
		{ name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
		{ name: 'styles' },
		{ name: 'colors' },
		{ name: 'about' }
	];

	config.removeButtons = 'Underline,Subscript,Superscript,Image';
	config.extraPlugins = 'doksoft_image';
	config.doksoft_uploader_url = '/admin/ckeditorfull/plugins/doksoft_uploader/uploader.php';

	config.format_tags = 'p;h1;h2;h3;pre';

	config.removeDialogTabs = 'image:advanced;link:advanced';
	
};

The config.js file is now the only thing I have changed, and it's still not functioning.
I appreciate your help.
Support team avatar
JS+
22:27 Mar 12, 2014
Please use browser debugger's 'Networking' tab to see what request is done and what response do you have.
Could you provide me an URL for testing (as private message to me)? I can check it right on your web site.
User's avatar
Rebecca T.
02:53 Mar 13, 2014
The errors in the Networking window are claiming a syntax error in uploader.php
Support team avatar
JS+
06:26 Mar 14, 2014
I have tested it on your page. Client part (config.js) is configured properly. And uploader is called OK, but it result is HTTP error 500.
So you need to see your `error.log` for web server or PHP.
I can guess that you have some syntax errors, maybe they appeared after editing of `config.js`.
But other cases are also possible, please check your log.
User's avatar
Rebecca T.
01:47 Mar 17, 2014
I have re-uploaded the original php files and the files are now uploading correctly, but I am still receiving the error. I have read in the help documentation that this is probably a server config error.
I am running my site on a Windows server with Plesk as the control panel. Is CKEditor Quick Image Upload+ compatible with Windows servers?
Support team avatar
JS+
07:44 Mar 17, 2014
So, all works wine except you have error message in the log?
As I know there are no problems with DOKSoft plugins on Windows servers. They are JS+PHP, so you are just to configure your Win server properly to support PHP and uploader must work fine.
Unfortunately I'm not familiar with configuring Windows servers (and you have not tell the text of your error). I may only recommend you to check target folder's permissions: sometimes it is exactly what is to be done.