Welcome, Guest
Username: Password: Remember me

TOPIC: Problem with image upload - ckfinder

Problem with image upload - ckfinder 3 years 1 month ago #65062

  • stockchris
  • stockchris's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Thank you received: 1
  • Karma: 1
I recently upgrade from 1.87 to 1.91+ and after some issues ended up doing a clean install of 1.91+. Everything seemed to work fine, except for uploading images to questions using the wysiwyg question editor (CKEditor). I keeped getting "You don't have permissions to upload files".
After doing some hunting around with our admin, we discovered that config.php in /admin/scripts/kcfinder wasn't configured properly. The lines in question read:
$_CONFIG = array(
 
    'disabled' => true,
    'readonly' => false,
    'denyZipDownload' => true,
 
    'theme' => "oxygen",
 
    'uploadURL' => "upload",
    'uploadDir' => "",
 
    'dirPerms' => 0755,
    'filePerms' => 0644,
 
    'deniedExts' => "exe com msi bat php cgi pl php4 php5 sh",
 
    'types' => array(
 
        // CKEditor & FCKEditor types
        'files'   =>  "",
        'flash'   =>  "",
        'images'  =>  "",
    ),
...

For some reason, the disabled flag is set "true", which caused the problem. Also, the upload dir isn't specified. I discovered that uploads are added to a subdirectory of the kcfinder directory and not to the upload directory of limesurvey. I assume that this is the reason for that. Now I have several questions:

1. Is this the result of a faulty installation? or
2. Does kcfinder need to be configured by the user? or
3. Could it be possible that this is a more general problem? and finally
4. Can I safely change the settings for disabled and uploaddir (and if yes, how can I specify upload dir so that images are saved to the corresponding survey folder in the limesurvey upload directory)?

Thanks a lot for you help!
Last Edit: 3 years 1 month ago by stockchris.
The administrator has disabled public write access.
The following user(s) said Thank You: ryanpfuller

Aw: Problem with image upload - ckfinder 3 years 1 month ago #65207

  • stockchris
  • stockchris's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Thank you received: 1
  • Karma: 1
Does anybody have any ideas or could someone please check their config.php in /admin/scripts/kcfinder to let me know how it needs to be configured in order to function properly? Help is still very much appreciated. Thanks!
The administrator has disabled public write access.

Re: Aw: Problem with image upload - ckfinder 3 years 1 month ago #65216

  • fvillerot
  • fvillerot's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 21
  • Thank you received: 2
  • Karma: 2
I had some problems like these with first versions of 1.91+, but all run correctly today.

Some suggestions :
1) clear IE cache
2) on server, check directory permissions. The uploaded files are writed on upload/surveys/<sid>/.thumbs/images and upload/surveys/<sid>/images . The directory .thumbs doesn't appear unless you use 'ls -al'.
3) try the image upload on another admin page, like template mail editor.
The administrator has disabled public write access.

Re: Aw: Problem with image upload - ckfinder 3 years 1 month ago #65268

  • stockchris
  • stockchris's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Thank you received: 1
  • Karma: 1
Hi,

thanks for your help. I did try no 1). clearing the cache has not effect at all. I also tried 3) and it works fine. I am pretty sure that the problem is with ckfinder. Would it be possible for you to post the config.php of it (see my second post for where to find the file). Regarding 2) I did check directory permissions (and even changed them to 777) several times. The upload/surveys/<sid>/images folder exists and there are already images in there from when we first set up the survey in Lime Survey 1.87. However, after the update of Lime Survey, I cannot add new images to the existing ones using the editor.
If I knew that my config.php was faulty, I would at least know that obviously the installation went wrong and I could retry. So if someone could post the content of the config.php file for ckfinder or if one of the admins here could tell me if the file should have been configured during the installation process, that would be a big help for me. Thanks!
The administrator has disabled public write access.

Re: Problem with image upload - ckfinder 2 years 4 months ago #80659

Hello,
I am encountering a similar problem.

I've recently updated to LimeSurvey Version 1.92+ Build 120517.

I am able to add images to a previously created survey, as well as to email templates for a previously created survey.

However, when I try to create a new survey, I am unable to add images to the survey. When I try to upload an image, I get the error message "You do not have permission to upload to the server". When I try to browse the server for previously uploaded images, I get the message "You do not have permission to browse the server".

Any advice or suggestions for how to address this would be appreciated.

Thank you in advance.

Ryan
The administrator has disabled public write access.

Re: Problem with image upload - ckfinder 2 years 4 months ago #80666

Hello,
I seemed to have resolved this issue.

In survey/admin/scripts/kcfinder/config.php

$_CONFIG = array(

'disabled' => true,
'readonly' => false,
'denyZipDownload' => true,

I changed disabled from "true" to "false" and it worked.

Ryan
The administrator has disabled public write access.

Re: Problem with image upload - ckfinder 2 years 4 months ago #80722

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5331
  • Thank you received: 296
  • Karma: 249
Hmm, that config file should not have changed during the update. From which version did you update?

This might also be connected to insufficient server rights. The server needs to have rights to create new folders at /upload/* to upload files for new surveys.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.170 seconds
Donation Image