View Issue Details

IDProjectCategoryView StatusLast Update
14422Bug reports[All Projects] Otherpublic2019-01-17 10:38
ReporterstartomAssigned To 
PrioritynoneSeveritycrash 
Status newResolutionopen 
Product Version3.15.x 
Target VersionFixed in Version 
Summary14422: KCFinder doesn't work
Description

When I'm trying to upload image to a question via KCFinder, it shows /third_party/kcfinder/browse.php with a blank screen.

TagsNo tags attached.
Complete LimeSurvey version number (& build)3.15.6+190108
I will donate to the project if issue is resolvedNo
Browser
Database & DB-Versionmysql Ver 14.14 Distrib 5.5.57, for Linux (x86_64) using readline 5.1
Server OS (if known)
Webserver software & version (if known)
PHP Version7.1.9

Activities

jelo

jelo

2019-01-16 14:55

developer   ~50219

When exact is the issue.
To me it looks like KCFinder is broken at all for this version.

I can reproduce a issue, cause the KCFinder code is showing the error message
"The each() function is deprecated. This message will be suppressed on further calls"

PHP each() is used somewhere. The message is not suppressed and trying again to upload is not working.

jelo

jelo

2019-01-16 14:58

developer   ~50221

Last edited: 2019-01-16 14:59

View 2 revisions

Errormessage on PHP 7.2 when uploading file via KCFinder (which is slightly different that the description of the ticketstarter, but the error message might be surpressed on that system.



DenisChenu

DenisChenu

2019-01-16 15:22

developer   ~50224

@jelo : PHP Version 7.2.13, debug mode activated
LS GIT version



DenisChenu

DenisChenu

2019-01-16 15:35

developer   ~50227

[shnoulle@poledra kcfinder]$ grep -r --include=*.php each .
./lang/ru.php:  * author: Dark Preacher
./js_localize.php:foreach ($lang as $english => $native) {
./core/bootstrap.php:  *      @desc This file is included first, before each other
./core/bootstrap.php:                foreach ($data as $key => $val)
./core/bootstrap.php:                foreach ($data as $val)
./core/class/uploader.php:            foreach ($sessVar as $key => $val)
./core/class/uploader.php:            foreach ($this->types[$this->type] as $key => $val)
./core/class/uploader.php:        foreach ($this->langInputNames as $key)
./core/class/uploader.php:            foreach ($file['name'] as $i => $name) {
./core/class/uploader.php:            foreach ($data as $key => $val)
./core/class/browser.php:                foreach ($files as $file)
./core/class/browser.php:            foreach ($this->file['name'] as $i => $name) {
./core/class/browser.php:        foreach($_POST['files'] as $file) {
./core/class/browser.php:        foreach($_POST['files'] as $file) {
./core/class/browser.php:        foreach($_POST['files'] as $file) {
./core/class/browser.php:        foreach ($_POST['files'] as $file) {
./core/class/browser.php:            foreach ($zipFiles as $cfile)
./core/class/browser.php:        foreach ($_POST['files'] as $file) {
./core/class/browser.php:            foreach ($zipFiles as $cfile)
./core/class/browser.php:        foreach ($files as $file) {
./core/class/browser.php:            foreach ($dirs as $i => $cdir) {
./core/class/browser.php:            foreach ($dirs as $cdir) {
./core/class/browser.php:            foreach ($dirs as $key => $cdir)
./core/class/minifier.php:        foreach (array_merge($mtFiles, $files) as $file) {
./core/class/minifier.php:        foreach ($files as $file) {
./lib/helper_path.php:        foreach (explode("/", $path) as $dir)
./lib/helper_path.php:        foreach (explode("/", $path) as $dir)
./lib/class_zipFolder.php:        foreach ($dir as $file)
./lib/class_image.php:        foreach ($drivers as $driver) {
./lib/class_image.php:            list($key, $width) = each($image);
./lib/class_image.php:            list($key, $height) = each($image);
./lib/helper_dir.php:        foreach ($files as $file) {
./lib/helper_dir.php:        foreach ($defaultOptions as $key => $val)
./lib/helper_httpCache.php:        if ($headers !== null) foreach ($headers as $header) header($header);
./lib/helper_httpCache.php:                    foreach ($sendHeaders as $header)
jelo

jelo

2019-01-16 15:50

developer   ~50228

Last edited: 2019-01-16 16:55

View 2 revisions

I get the message when uploading the actual file. The files gets uploaded.
I not sure, why we should compare your GIT with the 3.15.6+190108 which is the last release.

PHP is triggering a KCFinder error/info under PHP 7.2.13.
If I change to PHP 7.1 the message is gone (which is correct, it's just a deprecation warning, no real error).

The KCFinder section is a blackbox.

DenisChenu

DenisChenu

2019-01-16 16:53

developer   ~50230

Last edited: 2019-01-16 16:57

View 2 revisions

What is «actual file» ?

I think it's somewhere when an issue happen when try to upload : an error happen, the system start but broke during «view» it's why you see tye "-W3C …

Remind : i'm on PHP7.2.13 too …

Else , the each is here : https://github.com/LimeSurvey/LimeSurvey/blob/7c67c5bdf55450d4603e52d733afd63d0a5f52d6/third_party/kcfinder/lib/class_image.php#L113

jelo

jelo

2019-01-16 17:51

developer   ~50243

Last edited: 2019-01-16 17:57

View 2 revisions

Ok, tested a bit. PDF upload is fine. Graphics are the issue. So I think you got the issue. So the difference is which graphic library is used?

The priority is using gd as the lastest. 'imageDriversPriority' => "imagick gmagick gd",

Sideeffect when having a corrupted image uploaded into the image folder is that KCFinder no longer can show the image folder. KCFinder needs to be replaced. No development since 2014.

jelo

jelo

2019-01-16 17:51

developer   ~50244

Who gets the ticket assigned? Or should I open a new ticket.

jelo

jelo

2019-01-16 19:57

developer   ~50247

The is already a bugreport from Dec 2017 about each().
https://bugs.limesurvey.org/view.php?id=12992

DenisChenu

DenisChenu

2019-01-17 08:33

developer   ~50248

The bug 12992 is really a dumb report … one example : we don't use htmlfilter of phpmailer.
For controllers : maybe (surely) they are fixed.

And this bug start with a PHP7.1 issue , and i can't reproduce on 7.2
«Sideeffect when having a corrupted image uploaded into the image folder is that KCFinder no longer can show the image folder. » OK, then maybe the issue with each happen only for corrupted image. Can you send the zip of your image directory to see if i can reproduce (the fix) for 7.1 too ?
«KCFinder needs to be replaced. No development since 2014.» yes, and you propose ? Do you have a link for replacement ? It's not kcfinder to replace it's ckeditor
https://manual.limesurvey.org/Update_ckeditor
https://manual.limesurvey.org/TinyMCE

jelo

jelo

2019-01-17 10:32

developer   ~50249

I wouldn't call it a dumb report. The main issue is raised. If you expect from a reporter to check if a routine is used in the code, then fine.
I should have opened a new ticket. Will learn from that.

DenisChenu

DenisChenu

2019-01-17 10:38

developer   ~50251

i spoke for https://bugs.limesurvey.org/view.php?id=12992 : this is not a limesurvey bug report .

Issue History

Date Modified Username Field Change
2019-01-11 15:06 startom New Issue
2019-01-16 14:55 jelo Note Added: 50219
2019-01-16 14:58 jelo File Added: 2019kcfinderupload_each.png
2019-01-16 14:58 jelo Note Added: 50221
2019-01-16 14:59 jelo Note Edited: 50221 View Revisions
2019-01-16 15:22 DenisChenu File Added: Capture d’écran du 2019-01-16 15-20-13.png
2019-01-16 15:22 DenisChenu Note Added: 50224
2019-01-16 15:35 DenisChenu Note Added: 50227
2019-01-16 15:50 jelo Note Added: 50228
2019-01-16 16:53 DenisChenu Note Added: 50230
2019-01-16 16:55 jelo Note Edited: 50228 View Revisions
2019-01-16 16:57 DenisChenu Note Edited: 50230 View Revisions
2019-01-16 17:51 jelo Note Added: 50243
2019-01-16 17:51 jelo Note Added: 50244
2019-01-16 17:57 jelo Note Edited: 50243 View Revisions
2019-01-16 19:57 jelo Note Added: 50247
2019-01-17 08:33 DenisChenu Note Added: 50248
2019-01-17 10:32 jelo Note Added: 50249
2019-01-17 10:38 DenisChenu Note Added: 50251