View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
03685Bug reportsSurvey takingpublic2009-09-22 00:58
Reporteruser4909Assigned Toc_schmitz  
PrioritynormalSeverityblock 
Status closedResolutionfixed 
Product Version1.85+ 
Fixed in Version1.85+ 
Summary03685: It always reports "Notice: Undefined variable: rooturl in /opt/lampp/htdocs/limesurvey/index.php on line 1742"
Description

After I have installed limesurvey185plus-build7593-20090907.tar.bz2 on xampp-linux-1.7.2.tar.gz, I fill in some questionnaires. Yet when I made a preview, it always displays this error information:

"Notice: Undefined variable: rooturl in /opt/lampp/htdocs/limesurvey/index.php on line 1742"

I'm sure that the installation is successful because I can login the admin page use the default username and passwd. And I can fill in the questionnaires. Yet it just report this issue when I enable the questionnaire token.

I have tried with limesurvey185plus-build7523-20090824.tar.bz2 and it has report the same issue. I'm not a PHP developer, yet on limesurvey's official website, it's said that limesurvey would work xampp without any need to make modification.

By the way, my host is Ubuntu 9.04 32bit. And I have tried it on both RHEL4.0 and Ubuntu 8.10, all fails.

TagsNo tags attached.
Bug heat10
Complete LimeSurvey version number (& build)7593
I will donate to the project if issue is resolved
BrowserFirefox-3.0.14 on Linux
Database type & versionmysql Ver 14.14 Distrib 5.1.37, for unknown-linux-gnu (x86_64) using EditLine wrapper
Server OS (if known)Ubuntu 8.10(32 bit), Ubuntu 9.04(32 bit), RHEL-4.0
Webserver software & version (if known)Server version: Apache/2.2.12 (Unix) Server built: Jul 30 2009 10:16:29
PHP VersionPHP 5.3.0 (cli) (built: Jul 30 2009 10:44:08) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

Users monitoring this issue

Mazi

Activities

user4909

2009-09-15 13:48

  ~09557

Yep. I found the root issue. It's caused by that I changed the default setting of "Use CAPTCHA for: " to:

Survey Access/--------/Save & Load

If I changed it back to:
-------/-------/------

Then it would be OK...

Mazi

Mazi

2009-09-15 16:10

updater   ~09561

Can you please upload your config.php file (xxx out any passwords)? I just want to check that there is no other source for this problem.

Also attach your survey for testing, thanks!

user4909

2009-09-15 16:17

  ~09562

Here it is(with values for those key variables):

// Basic Setup

$databasetype = 'mysql'; // ADOdb database driver - valid values are mysql, odbc_mssql or postgres
$databaselocation = 'localhost'; // Network location of your Database - for odbcmssql use the mssql servername, not localhost or IP
$databasename = 'limesurvey'; // The name of the database that we will create
$databaseuser = 'survey'; // The name of a user with rights to create db (or if db already exists, then rights within that db)
$databasepass = 'xxxxxx'; // Password of db user
$dbprefix = 'lime
'; // A global prefix that can be added to all LimeSurvey tables. Use this if you are sharing
// a database with other applications. Suggested prefix is 'lime_'
// File Locations
$rooturl = "http://{$_SERVER['HTTP_HOST']}/limesurvey"; //The root web url for your limesurvey installation (without a trailing slash). The double quotes (") are important.

$rootdir = dirname(FILE); // This is the physical disk location for your limesurvey installation. Normally you don't have to touch this setting.
// If you use IIS then you MUST enter the complete rootdir e.g. : $rootDir='C:\Inetpub\wwwroot\limesurvey'!
// Some IIS installations also require to use forward slashes instead of backslashes, e.g. $rootDir='C:/Inetpub/wwwroot/limesurvey'!
// If you use OS/2 this must be the complete rootdir with FORWARD slashes e.g.: $rootDir='c:/limesurvey';!
// Site Setup
$sitename = 'CDC Survey Engine'; // The official name of the site (appears in the Window title)
$defaultuser = 'admin'; // This is the default username when LimeSurvey is installed
$defaultpass = 'xxxxxx'; // This is the default password for the default user when LimeSurvey is installed

// Email Settings

$siteadminemail = 'Dinny.Wu@my-company.com'; // The default email address of the site administrator
$siteadminbounce = 'Dinny.Wu@my-company.com'; // The default email address used for error notification of sent messages for the site administrator (Return-Path)
$siteadminname = 'Dinny Wu'; // The name of the site administrator

// Company Email Server Connection Settings
$emailmethod = 'smtp';
$emailsmtphost = 'smtp-na.my-company.com';

// Company LDAP services
//$enableLdap = true;

Mazi

Mazi

2009-09-15 16:24

updater   ~09563

Can you also upload your survey for testing as .csv file?

jelo

jelo

2009-09-15 17:22

partner   ~09565

Last edited: 2009-09-15 17:59

In the htmlsourcecode the captcha is <img src='/verification.php' />
Seems to me that the $rooturl is not set when generating the page.

If you install limesurvey into a subdirectory the captcha won't get generated.
because /verification.php will be not found.

verification.php is used three times in index.php :
<img id='captchaimage' src='$rooturl/verification.php' />

When I declare $rooturl global in the function buildsurveysession() (which i CANNOT recommend as a proper solution, since I don't know the codebase well enough ) the captcha is working fine.

Mazi

Mazi

2009-09-15 18:20

updater   ~09566

Thanks for identifying the source of the problem, jelo. This should be fixed soon.

user4909

2009-09-15 18:57

  ~09567

Thank you for your kindly analysis, Jely. It's really the $rooturl variable's problem, which needs to be declared as global.

Anyway, I know where the problem is and I have made a temp workaround for urgent use.

c_schmitz

c_schmitz

2009-09-15 21:01

administrator   ~09568

Last edited: 2009-09-16 00:40

Declaring it global is fine. You should still deactivate notices on a production system.

Issue History

Date Modified Username Field Change
2009-09-15 13:34 user4909 New Issue
2009-09-15 13:34 user4909 Status new => assigned
2009-09-15 13:34 user4909 Assigned To => user372
2009-09-15 13:34 user4909 Build Number => 7593
2009-09-15 13:34 user4909 Browser => Firefox-3.0.14 on Linux
2009-09-15 13:34 user4909 Database & DB-Version => mysql Ver 14.14 Distrib 5.1.37, for unknown-linux-gnu (x86_64) using EditLine wrapper
2009-09-15 13:34 user4909 Operating System (Server) => Ubuntu 8.10(32 bit), Ubuntu 9.04(32 bit), RHEL-4.0
2009-09-15 13:34 user4909 Webserver => Server version: Apache/2.2.12 (Unix) Server built: Jul 30 2009 10:16:29
2009-09-15 13:34 user4909 PHP Version => PHP 5.3.0 (cli) (built: Jul 30 2009 10:44:08) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
2009-09-15 13:48 user4909 Note Added: 09557
2009-09-15 16:10 Mazi Note Added: 09561
2009-09-15 16:10 Mazi Status assigned => feedback
2009-09-15 16:10 Mazi Issue Monitored: Mazi
2009-09-15 16:17 user4909 Note Added: 09562
2009-09-15 16:24 Mazi Note Added: 09563
2009-09-15 17:22 jelo Note Added: 09565
2009-09-15 17:22 jelo Note Edited: 09565
2009-09-15 17:22 jelo Note Edited: 09565
2009-09-15 17:26 jelo Note Edited: 09565
2009-09-15 17:58 jelo Note Edited: 09565
2009-09-15 17:59 jelo Note Edited: 09565
2009-09-15 18:20 Mazi Note Added: 09566
2009-09-15 18:21 Mazi Status feedback => assigned
2009-09-15 18:21 Mazi Assigned To user372 => c_schmitz
2009-09-15 18:57 user4909 Note Added: 09567
2009-09-15 21:01 c_schmitz Note Added: 09568
2009-09-15 21:01 c_schmitz Status assigned => resolved
2009-09-15 21:01 c_schmitz Fixed in Version => 1.85+
2009-09-15 21:01 c_schmitz Resolution open => fixed
2009-09-16 00:40 c_schmitz Note Edited: 09568
2009-09-22 00:58 c_schmitz Status resolved => closed
2010-10-25 00:18 c_schmitz Category Survey at Runtime => Survey taking
2021-08-05 15:52 guest Bug heat 8 => 10