Manage more file extension in 2.05 rel

More
3 months 3 weeks ago #219994 by achecchini
Hi community!
while I'm planning a version upgrade to 3.27. xx I have some surveys served by an old limesurvey 2.05 installation 

recently we have the necessity to administer a survey with a link to .ppsx file stored in the survey local repository. But when try to upload the message "Denied file extension" is shown.

meny year ago, when started the setup installation, I change -if my memory is not in mistake- the config.php for manage some other file type (i.e. doc or docx, xls, pdf and others) but examinating today the config.php I didn't find any line with instructions for manage extensions and MIME types! or I didn't find this istructions where aspected to be! So I try to Search an old manual version, but I didn't find it. 

Can someone address me to the correct way to configure lime to accept others file extensions in this old release of limesurvey?

Any help will be very appreciated!

Ago

 

Please Log in to join the conversation.

More
3 months 3 weeks ago - 3 months 3 weeks ago #220021 by Joffm
Maybe this helps.

In "config-defaults.php" you find
// Please be very careful if you want to allow SVG files - there are several XSS dangerous security issues

$config('allowedthemeimageformats') = 'gif,ico,jpg,png'; // Image file types allowed to be uploaded in the themes section.

$config('allowedthemeuploads') = 'css,js,map,json,eot,ttf,woff,txt,md,xml,woff2,twig'; // Other file types allowed to be uploaded in the themes section.

$config('allowedresourcesuploads') = '7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,ico,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,xml,zip,css,js'; // File types allowed to be uploaded in the resources sections, and with the HTML Editor

Replace the "(" and ")" by "[" and "]". I changed because this editor removed them.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 months 3 weeks ago by Joffm.

Please Log in to join the conversation.

More
3 months 3 weeks ago #220028 by achecchini
Hi Joffm! thanks as usual for your suggestions!

In an old thread I had read that changing config-default.php in not the best idea because the file is replaced every time you update the Lime release.

What do you think about that? This mean that the config-default.php must be edited everytime a release change is uploaded?

Thanks in advance for your gentle reply.

Have a nice day

Ago

Please Log in to join the conversation.

More
3 months 3 weeks ago #220031 by holch

while I'm planning a version upgrade to 3.27.


When you are already at it, and assuming that you are not the "regular update" type of person, seeing that you are still running a 2.05, I would recommend to go straight to LS 5.x, because from what I know, LS 3 will only be supported until the end of this year. After that, it will only receive security updates (and not sure for how long).

Updating to LS 3.x might not be worth the while for the last 3,5 months until LS 3.x is end of life.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

More
3 months 3 weeks ago - 3 months 3 weeks ago #220032 by holch
You should always change the config.php, not the config-defaults.php from what I know.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Last edit: 3 months 3 weeks ago by holch.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

More
3 months 3 weeks ago #220051 by DenisChenu

You should always change the config.php, not the config-defaults.php from what I know.
 

+1 , NEVER update config-default.php

manual.limesurvey.org/Optional_settings#Introduction
 

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.

Please Log in to join the conversation.

More
3 months 3 weeks ago #220092 by achecchini
Hi to all Lime users that was so gentle to reply to my questions!

1) reply to Holch: Yes I agree the best idea is to became a "regular update" type of person :-) & Yes is necessary to upgrade from 2.05 up to last stable release!
2) reply to Holch & Denis: I understand: config-default.php should never been modify! 

Ok. But considering the problem of changing the file extention and MIME type to others format what I shoud to do in the 2.05 release?

In the file I have extracted from my actual Lime configuration the only linees i see in config.php to be modify for this goal are:

    'types' => array(

        // CKEditor & FCKEditor types
        'files'   =>  "",
        'flash'   =>  "swf",
        'images'  =>  "*img",

        // TinyMCE types
        'file'    =>  "",
        'media'   =>  "swf flv avi mpg mpeg qt mov wmv asf rm",
        'image'   =>  "*img",
    ),

I haven't found any lines with the command:

 $config(allowed* ...

that the manual indicates as the line must be changed!
So I'm confused about where I must change the instructions! 
Above all I find strange that these lines are empty despite to the fact that actually extention file like: .doc, .xls, .pdf are regulary managed!

Please Log in to join the conversation.

More
3 months 3 weeks ago #220105 by Joffm
And just to clarify:
I did not recommend to change the "config-default.php"
I only showed which extensions are existing there.

And in "config.php" you see this line
// Use the following config variable to set modified optional settings copied from config-defaults.php

That was my idea.

Joffm



 


Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu, holch, achecchini

Please Log in to join the conversation.

More
3 months 3 weeks ago #220139 by achecchini
Thanks Joffm for patience and replay!

So, as suggested, in the config.php, under the statment
// Use the following config variable ...
I put:
'config'=>array(
$config = 'gif,ico,jpg,png'; // Image file types allowed to be uploaded in the themes section.

$config = 'css,js,map,json,eot,ttf,woff,txt,md,xml,woff2,twig'; // Other file types allowed to be uploaded in the themes section.

$config = '7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,ico,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,xml,zip,css,js'; // File types allowed to be uploaded in the resources sections, and with the HTML Editor
)
to manage file extention as desiderated. Right?

Ago

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now