View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
05329Bug reportsSurvey takingpublic2011-07-22 16:23
Reporterwabrit Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version1.91+ 
Fixed in Version1.91+ 
Summary05329: Undefined index: QUERY_STRING in index.php
Description

I haven't been able to determine the necessary conditions, but I am occasionally seeing the error:

Undefined index: QUERY_STRING in index.php on line 2892

when I launch a survey.

Steps To Reproduce

Launch survey - if error does occur it always occurs on first page; sometimes it occurs on subsequent pages but not always.

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)10377
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMS SQL Server 2008 R2
Server OS (if known)Windows 7
Webserver software & version (if known)Tomcat 6.0.32
PHP Version5.3.6

Users monitoring this issue

There are no users monitoring this issue.

Activities

wabrit

wabrit

2011-07-08 11:04

reporter   ~15677

Last edited: 2011-07-08 11:05

I've managed to narrow this down some more; the problem only arises when buildsurveysession() is called from the following code in index.php. The code segment is


// Let's do this only if
// - a saved answer record hasn't been loaded through the saved feature
// - the survey is not anonymous
// - the survey is active
// - a token information has been provided
// - the survey is setup to allow token-response-persistence
if ($thissurvey['tokenanswerspersistence'] == 'Y' && !isset($_SESSION['srid']) && $thissurvey['anonymized'] == "N" && $thissurvey['active'] == "Y" && isset($token) && $token !='')
{
// load previous answers if any (dataentry with nosubmit)
$srquery="SELECT id FROM {$thissurvey['tablename']}"
. " WHERE {$thissurvey['tablename']}.token='".db_quote($token)."'\n";

$result = $connect->GetOne($srquery);
if ($result !== false && !is_null($result))
{
    $_SESSION['srid'] = $result;
}
buildsurveysession();
loadanswers();

}


This happens after I click "Next" on the welcome page; presumably the issue is that the URL loses any query string at this point and simply addresses /index.php.

Presumably the offending line of index.php

$_SESSION['ls_initialquerystr']=$_SERVER['QUERY_STRING'];

should at least do an isset() on the $_SERVER['QUERY_STRING'], but I don't know enough about what the code is doing to know if anything else needs to be done.

c_schmitz

c_schmitz

2011-07-08 17:14

administrator   ~15685

Fixed in rev 10454

c_schmitz

c_schmitz

2011-07-22 16:23

administrator   ~15842

New 1.91+ version released

Issue History

Date Modified Username Field Change
2011-07-07 19:32 wabrit New Issue
2011-07-08 11:04 wabrit Note Added: 15677
2011-07-08 11:05 wabrit Note Edited: 15677
2011-07-08 17:12 c_schmitz Assigned To => c_schmitz
2011-07-08 17:12 c_schmitz Status new => assigned
2011-07-08 17:14 c_schmitz Note Added: 15685
2011-07-08 17:14 c_schmitz Status assigned => resolved
2011-07-08 17:14 c_schmitz Fixed in Version => 1.91+
2011-07-08 17:14 c_schmitz Resolution open => fixed
2011-07-22 16:23 c_schmitz Note Added: 15842
2011-07-22 16:23 c_schmitz Status resolved => closed