View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
03930Bug reportsInstallationpublic2009-12-11 12:17
Reportermdekker Assigned Tomdekker  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.86 
Fixed in Version1.87RC5 
Summary03930: Double include for config.php
Description

In some parts of the program config.php is included, I suppose this is done for lsrc. When the config was already include it is read another time.

The problem that occurs for me is in $dbprefix. In normal program flow it goes from config.php to common.php where it is converted to lowercase. Under certain conditions the config.php is included after common.php has run resulting in an uppercase dbprefix.

To reproduce: use an uppercase dbprefix on install and try tot csv export a survey. (There must be more ways, but this is the one I found)

Additional Information

If more information is needed, please let me know.

To just include the config only when lsrc is used won't be the solution I suppose because then lsrc will have the dbprefix problem.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)7697
I will donate to the project if issue is resolved
Browser
Database type & versionMySQL
Server OS (if known)dna
Webserver software & version (if known)dna
PHP Versiondna

Users monitoring this issue

There are no users monitoring this issue.

Activities

user372

2009-11-30 18:21

  ~10377

Is this problem only related with LSRC?

mdekker

mdekker

2009-11-30 19:02

reporter   ~10379

I think, but am not really sure, that it was introduced because lsrc doesn't follow normal program flow and thus needs to include config.php in certain locations.

I suppose the one who does lsrc knows why the include is there and he is the one who can best think of a fix. It might be as simple as including common.php after the config.php or just lowercasing the dbprefix after the include... but since I am not sure I leave it to the pro's :)

As stated in the report, try to export a survey as csv to reproduce while dbprefix is uppercase.

c_schmitz

c_schmitz

2009-12-07 11:40

administrator   ~10503

Just change the include to include_once.

mdekker

mdekker

2009-12-07 13:59

reporter   ~10504

I checked a little more... at least in /admin/html.php the include is done 3 times, all with a comment in the line above: //XXX

Checking lsrc I found out the config.php was included when needed so I think the includes are just obsolete.

mdekker

mdekker

2009-12-07 14:25

reporter   ~10505

Fixed in svn 8093

Issue History

Date Modified Username Field Change
2009-11-30 13:19 mdekker New Issue
2009-11-30 13:19 mdekker Status new => assigned
2009-11-30 13:19 mdekker Assigned To => user372
2009-11-30 13:19 mdekker LimeSurvey build number => 7697
2009-11-30 13:19 mdekker Database & DB-Version => MySQL
2009-11-30 13:19 mdekker Operating System (Server) => dna
2009-11-30 13:19 mdekker Webserver => dna
2009-11-30 13:19 mdekker PHP Version => dna
2009-11-30 18:21 user372 Note Added: 10377
2009-11-30 18:22 user372 Status assigned => feedback
2009-11-30 19:02 mdekker Note Added: 10379
2009-11-30 19:41 user372 Status feedback => assigned
2009-11-30 19:41 user372 Assigned To user372 => rakete
2009-12-07 11:40 c_schmitz Note Added: 10503
2009-12-07 13:59 mdekker Note Added: 10504
2009-12-07 14:20 mdekker Assigned To rakete => mdekker
2009-12-07 14:25 mdekker Note Added: 10505
2009-12-07 14:25 mdekker Status assigned => resolved
2009-12-07 14:25 mdekker Fixed in Version => 1.87RC5
2009-12-07 14:25 mdekker Resolution open => fixed
2009-12-11 12:17 c_schmitz Status resolved => closed