View Issue Details

IDProjectCategoryView StatusLast Update
14745Bug reportsSurvey takingpublic2019-05-10 15:36
ReporterDenisChenu Assigned Todominikvitt 
PrioritynoneSeverityblock 
Status closedResolutionfixed 
Product Version4.0.0dev 
Fixed in Version4.0.0dev 
Summary14745: Use of undefined constant SODIUM_LIBRARY_VERSION
Description

PHP7.2 : receive this at second page of lss and debug = 2

Steps To Reproduce

Import included survey
Set debug at 2
Launch, next

Additional Information

Strange : error manager is not Yii or theme ?

TagsNo tags attached.
Complete LimeSurvey version number (& build)4.0.0 github
I will donate to the project if issue is resolvedNo
BrowserFF
Database & DB-Versionmariadb
Server OS (if known)fedora/linux
Webserver software & version (if known)nginx
PHP Version7.2.16

Activities

DenisChenu

DenisChenu

2019-04-05 10:13

developer  

index.php.html (3,046 bytes)   
<!DOCTYPE html>
<html dir="ltr" class="fr dir-ltr  js " lang="fr"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body><h1>PHP Error [500]</h1>
<p>Use of undefined constant SODIUM_LIBRARY_VERSION - assumed 
'SODIUM_LIBRARY_VERSION' (this will throw an Error in a future version 
of PHP) 
(/mnt/data/shnoulle/nginx/www/develop/third_party/sodium/Sodium.php:33)</p>
<pre>#0 /mnt/data/shnoulle/nginx/www/develop/framework/base/CApplication.php(834): CErrorHandler-&gt;handle()
#1 /mnt/data/shnoulle/nginx/www/develop/third_party/sodium/Sodium.php(33): LSYii_Application-&gt;handleError()
#2 /mnt/data/shnoulle/nginx/www/develop/third_party/sodium/Sodium.php(12): Sodium-&gt;checkIfLibraryExists()
#3 /mnt/data/shnoulle/nginx/www/develop/framework/base/CModule.php(394): Sodium-&gt;init()
#4 /mnt/data/shnoulle/nginx/www/develop/framework/base/CModule.php(103): LSYii_Application-&gt;getComponent()
#5 /mnt/data/shnoulle/nginx/www/develop/application/models/LSActiveRecord.php(305): LSYii_Application-&gt;__get()
#6 /mnt/data/shnoulle/nginx/www/develop/application/models/LSActiveRecord.php(293): SurveyDynamic-&gt;decryptEncryptAttributes()
#7 /mnt/data/shnoulle/nginx/www/develop/application/models/SurveyDynamic.php(121): SurveyDynamic-&gt;encryptSave()
#8 /mnt/data/shnoulle/nginx/www/develop/application/helpers/expressions/em_manager_helper.php(5508): SurveyDynamic-&gt;insertRecords()
#9 /mnt/data/shnoulle/nginx/www/develop/application/helpers/expressions/em_manager_helper.php(5335): LimeExpressionManager-&gt;_UpdateValuesInDatabase()
#10 /mnt/data/shnoulle/nginx/www/develop/application/helpers/SurveyRuntimeHelper.php(948): NavigateForwards()
#11 /mnt/data/shnoulle/nginx/www/develop/application/helpers/SurveyRuntimeHelper.php(647): SurveyRuntimeHelper-&gt;setMoveResult()
#12 /mnt/data/shnoulle/nginx/www/develop/application/helpers/SurveyRuntimeHelper.php(204): SurveyRuntimeHelper-&gt;initMove()
#13 /mnt/data/shnoulle/nginx/www/develop/application/controllers/survey/index.php(604): SurveyRuntimeHelper-&gt;run()
#14 /mnt/data/shnoulle/nginx/www/develop/application/controllers/survey/index.php(24): index-&gt;action()
#15 /mnt/data/shnoulle/nginx/www/develop/framework/web/actions/CAction.php(76): index-&gt;run()
#16 /mnt/data/shnoulle/nginx/www/develop/framework/web/CController.php(308): index-&gt;runWithParams()
#17 /mnt/data/shnoulle/nginx/www/develop/framework/web/CController.php(286): SurveyController-&gt;runAction()
#18 /mnt/data/shnoulle/nginx/www/develop/framework/web/CController.php(265): SurveyController-&gt;runActionWithFilters()
#19 /mnt/data/shnoulle/nginx/www/develop/framework/web/CWebApplication.php(282): SurveyController-&gt;run()
#20 /mnt/data/shnoulle/nginx/www/develop/framework/web/CWebApplication.php(141): LSYii_Application-&gt;runController()
#21 /mnt/data/shnoulle/nginx/www/develop/framework/base/CApplication.php(185): LSYii_Application-&gt;processRequest()
#22 /mnt/data/shnoulle/nginx/www/develop/index.php(194): LSYii_Application-&gt;run()
</pre></body></html>
index.php.html (3,046 bytes)   
DenisChenu

DenisChenu

2019-04-05 10:26

developer   ~51370

https://github.com/paragonie/sodium_compat#php-72-polyfill
https://github.com/LimeSurvey/LimeSurvey/commit/bc1a1a290a9f8bc9dca43d82a191eceb8a538769

It's not the libray, it's the way of inclusion. Else : strange to see own inclusion in third_party : think it's best in application/core ?

I check updating to https://github.com/paragonie/sodium_compat/releases/tag/v1.9.1 : not fix the issue.

DenisChenu

DenisChenu

2019-04-05 10:31

developer   ~51371

Seems sodium is in my 7.2 ?
https://wiki.php.net/doc/todo/migrationguide

DenisChenu

DenisChenu

2019-04-05 10:37

developer   ~51372

Fixed by

    public function checkIfLibraryExists(){
        if(defined('SODIUM_LIBRARY_VERSION')) {
        $this->bLibraryExists = true;
        }
    }

But :

  1. tab to space must be fixed
  2. I don't think it must be in third-party : not really a third-party ? Right ?
dominikvitt

dominikvitt

2019-04-18 10:51

developer   ~51510

With latest changes for data encryption feature, all issues, including this one, are fixed.

c_schmitz

c_schmitz

2019-05-10 15:36

administrator   ~51883

4.0beta1 released

Issue History

Date Modified Username Field Change
2019-04-05 10:13 DenisChenu New Issue
2019-04-05 10:13 DenisChenu File Added: limesurvey_survey_221856.lss
2019-04-05 10:13 DenisChenu File Added: index.php.html
2019-04-05 10:24 DenisChenu Assigned To => dominikvitt
2019-04-05 10:24 DenisChenu Status new => assigned
2019-04-05 10:26 DenisChenu Note Added: 51370
2019-04-05 10:26 DenisChenu Description Updated View Revisions
2019-04-05 10:31 DenisChenu File Added: Capture d’écran du 2019-04-05 10-29-53.png
2019-04-05 10:31 DenisChenu Note Added: 51371
2019-04-05 10:37 DenisChenu Note Added: 51372
2019-04-18 10:51 dominikvitt Status assigned => resolved
2019-04-18 10:51 dominikvitt Resolution open => fixed
2019-04-18 10:51 dominikvitt Fixed in Version => 4.0.0dev
2019-04-18 10:51 dominikvitt Note Added: 51510
2019-05-10 15:36 c_schmitz Note Added: 51883
2019-05-10 15:36 c_schmitz Status resolved => closed