View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
11552Bug reportsInstallationpublic2016-08-17 14:54
Reporterrjohnson Assigned Toc_schmitz  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.50.x 
Fixed in Version2.50.x 
Summary11552: Cannot install on PHP 5.3.10
Description

The installation will fail with

syntax error, unexpected '[' in /var/www/limesurvey/application/models/User.php on line 340

Steps To Reproduce

Try and install on an Ubuntu machine running 5.3.10 (Ubuntu 12.04 LTS installs this by default). The installation will fail with

syntax error, unexpected '[' in /var/www/limesurvey/application/models/User.php on line 340

Additional Information

I was trying to install on PHP Version 5.3.10-1ubuntu3.11 and I got the error. When I installed on a fresh machine with PHP Version 5.5.9-1ubuntu4.19 on it (Ubuntu 14.04 LTS), the install ran fine.

You can fix this by making the following changes to User.php

Add the code

    $dUserA = $this->getName($this->uid);
    $dUser = $dUserA[0]['full_name'];

just after line 331 ($changeOwnershipUrl = Yii::app()->getController()->createUrl('admin/user/sa/setasadminchild'); )

and then change all instances of $this->getName($this->uid) [0] [ 'full_name' ] to $dUser

Now, this may be a really bad idea because there could be other instances of similar code that will not parse in 5.3.10 so I would think upgrading PHP to 5.5+ would be a better idea

If you do not want to fix this then I suggest changing the documentation because it says that LimeSurvey will run on PHP 5.3.3+ which it clearly will not.

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)250plus-build160810
I will donate to the project if issue is resolvedNo
BrowserChrome 52
Database type & versionMySQL 5.5.35
Server OS (if known)Ubuntu 12.04 LTS
Webserver software & version (if known)Apache 2.2.22
PHP Version5.3.10

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2016-08-17 11:08

administrator   ~40302

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=20080

c_schmitz

c_schmitz

2016-08-17 14:54

administrator   ~40318

Version 2.50+ Build 160817 released

Related Changesets

LimeSurvey: master fcfb0b92

2016-08-17 09:08:21

c_schmitz

Details Diff
Fixed issue 11552: Cannot install on PHP 5.3.x due to issue with users Affected Issues
11552
mod - application/controllers/admin/participantsaction.php Diff File
mod - application/models/User.php Diff File

Issue History

Date Modified Username Field Change
2016-08-16 19:51 rjohnson New Issue
2016-08-17 11:08 c_schmitz Changeset attached => LimeSurvey master fcfb0b92
2016-08-17 11:08 c_schmitz Note Added: 40302
2016-08-17 11:08 c_schmitz Assigned To => c_schmitz
2016-08-17 11:08 c_schmitz Resolution open => fixed
2016-08-17 11:09 c_schmitz Status new => resolved
2016-08-17 11:09 c_schmitz Fixed in Version => 2.5
2016-08-17 14:54 c_schmitz Note Added: 40318
2016-08-17 14:54 c_schmitz Status resolved => closed