Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Problem with image upload - ckfinder

  • stockchris
  • stockchris's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 6 months ago - 12 years 6 months ago #65062 by stockchris
Problem with image upload - ckfinder was created by stockchris
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:
Code:
$_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: 12 years 6 months ago by stockchris.
The following user(s) said Thank You: ryanpfuller
The topic has been locked.
  • stockchris
  • stockchris's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 6 months ago #65207 by stockchris
Replied by stockchris on topic Aw: Problem with image upload - ckfinder
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 topic has been locked.
More
12 years 6 months ago #65216 by fvillerot
Replied by fvillerot on topic Aw: Problem with image upload - ckfinder
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 topic has been locked.
  • stockchris
  • stockchris's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 6 months ago #65268 by stockchris
Replied by stockchris on topic Aw: Problem with image upload - ckfinder
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 topic has been locked.
More
11 years 9 months ago #80659 by ryanpfuller
Replied by ryanpfuller on topic Problem with image upload - ckfinder
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 topic has been locked.
More
11 years 9 months ago #80666 by ryanpfuller
Replied by ryanpfuller on topic Problem with image upload - ckfinder
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 topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
11 years 9 months ago #80722 by Mazi
Replied by Mazi on topic Problem with image upload - ckfinder
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
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #158059 by Joffm
Replied by Joffm on topic Problem with image upload - ckfinder
Hi, emilyjohn,

what do you want to tell us?

Which error message did you get? The one Ryan got? Well this is 5 years old.
And I happy that you were able to solve your problem. But I'd more appreciate if you told us how.

You see, in all of your last post you answer to questions which are absolutely outdated and repeat already given answers.

Regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose