View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
04369Bug reportsOtherpublic2010-07-06 11:22
ReporterMatijs Assigned Toc_schmitz  
PrioritynormalSeverityblock 
Status closedResolutionwon't fix 
Product Version1.90b 
Summary04369: Admin module crashes on Vista when using mysqli
Description

After upgrading to the latest beta version admin.php crashed with a FastCGI error on my Vista machine using PHP 5.3-NTS, while the same code worked OK on my Windows 2003 machine using PHP 5.2-NTS.

Changing config.php to use mysql solves the problem.

Steps To Reproduce

I am not sure if it is reproducible as it seems very machine dependent.

Additional Information

Inserting the line
$arr = array('');
in the function ServerInfo() in adodb-mysqli.inc.php seems to solve the problem.

The function becomes:

    function ServerInfo()
    {
        $arr = array('');
        $arr['description'] = $this->GetOne("select version()");
        $arr['version'] = $this->_findvers($arr['description']);
        return $arr;
    }

If anyone can tell me why this happened or if some else has the same problem I will be very glad to know.

TagsNo tags attached.
Attached Files
adodb-mysqli.inc.php.diff (641 bytes)   
Index: adodb-mysqli.inc.php
===================================================================
--- adodb-mysqli.inc.php	(revision 8748)
+++ adodb-mysqli.inc.php	(working copy)
@@ -155,6 +155,9 @@
 
         function ServerInfo()
         {
+            $arr = array(''); // If someone knows why this line prevents Vista from crashing 
+            // with a FastCGI erroro I am glad to learn of it, but for now it works.
+            // 2010-05-26 Matt de Jong
             $arr['description'] = $this->GetOne("select version()");
             $arr['version'] = ADOConnection::_findvers($arr['description']);
             return $arr;
adodb-mysqli.inc.php.diff (641 bytes)   
Bug heat10
Complete LimeSurvey version number (& build)1.90
I will donate to the project if issue is resolved
BrowserFirefox & IE
Database type & versionmysqli 5.1
Server OS (if known)W
Webserver software & version (if known)IIS 7
PHP Version5.3

Users monitoring this issue

lemeur

Activities

lemeur

lemeur

2010-05-26 19:02

developer   ~11980

Very weird indeed.

I let Carsten look at this when he gets back next week.

Matt, can you attach a diff file from 1.90beta3 in this ticket, this will save 3 Carsten seconds ;-)

Thibault

Matijs

Matijs

2010-05-26 19:09

reporter   ~11981

Added, will do so automatically from now on. ;-)

It does seem to me that this should not be a LS problem, but so far I failed to reproduce it in clean PHP code, while there are a lot of non-static references that are accessed as if they were static.

On the other hand I have this nagging doubt that I have had this problem before with other software.

c_schmitz

c_schmitz

2010-06-02 13:20

administrator   ~12093

If you run 'select version()' on your mysql server what is the result?

Matijs

Matijs

2010-06-02 19:33

reporter   ~12102

select version():
5.1.45-community

I access the same database from both Vista/PHP 5.3 and Windows 2003/PHP 5.2. 5.2 works, 5.3 doesn't.

Hardcoding the version string was one of the first things I tried, but didn't work:
$arr['description'] = '5.1.45-community';

Assigning the string didn't work:
$arr = array('description' => $this->GetOne(..));

Hardcoding the string and assigning it does work:
$arr = array('description' => '5.1.45-community');

Maybe it is just my Vista installation gone haywire. You can also leave this fix out and see if any other people have the problem.

c_schmitz

c_schmitz

2010-06-02 20:33

administrator   ~12103

hmm.. can you check what kind of value is given back by the GetOne statement?
use var_dump or similar

If it looks like a string then try

$arr['description'] = (string)$this->GetOne("select version()");

and see if that helps

Matijs

Matijs

2010-06-11 11:30

reporter   ~12216

Last edited: 2010-06-11 11:30

Interesting.

var_dump($this->GetOne("select version()"));

Gets me the familiar crash.

$x = $this->GetOne("select version()");
var_dump($x);

Gets:
string(16) "5.1.45-community"

While:

$arr = array('description' => (string) $this->GetOne("select version()"));

does work without any problems - and is of course way more elegant than my solution.

Is this a known PHP / Vista problem?

mdekker

mdekker

2010-06-16 13:09

reporter   ~12226

@Matijs, we had mysqli problems too on our dev server with adodb causing segfaults. Adodb states mysqli is tested only for the most common functions, so bugfixing at adodb project would be great.

c_schmitz

c_schmitz

2010-06-16 23:29

administrator   ~12236

I think it is a bug in PHP 5.3 somewhere regarding the return type.
We can't 'fix' it because with next ADODB update this will come back - I also fear that reporting this to adodb project won't help since it most prbabyl isn't an error in adodb. It might help to investigate the crash deeper in the adodb library and report it to the PHP project if it is really a PHP bug.

Anyway, since nobody is able to reproduce here you (Matjis) will have to dig deeper and find out.

Matijs

Matijs

2010-06-17 12:53

reporter   ~12248

I will dig deeper, might take me some time though. :(

Also I will keep testing mysqli for a while.

Issue History

Date Modified Username Field Change
2010-05-26 18:44 Matijs New Issue
2010-05-26 18:44 Matijs Status new => assigned
2010-05-26 18:44 Matijs Assigned To => user372
2010-05-26 19:00 lemeur Issue Monitored: lemeur
2010-05-26 19:00 lemeur Assigned To user372 => c_schmitz
2010-05-26 19:02 lemeur Note Added: 11980
2010-05-26 19:06 Matijs File Added: adodb-mysqli.inc.php.diff
2010-05-26 19:09 Matijs Note Added: 11981
2010-06-02 13:20 c_schmitz Note Added: 12093
2010-06-02 13:20 c_schmitz Status assigned => feedback
2010-06-02 19:33 Matijs Note Added: 12102
2010-06-02 19:33 Matijs Status feedback => assigned
2010-06-02 20:33 c_schmitz Note Added: 12103
2010-06-04 01:45 Mazi Status assigned => feedback
2010-06-11 11:30 Matijs Note Added: 12216
2010-06-11 11:30 Matijs Status feedback => assigned
2010-06-11 11:30 Matijs Note Edited: 12216
2010-06-16 13:09 mdekker Note Added: 12226
2010-06-16 23:29 c_schmitz Note Added: 12236
2010-06-16 23:30 c_schmitz Status assigned => resolved
2010-06-16 23:30 c_schmitz Resolution open => won't fix
2010-06-17 12:53 Matijs Note Added: 12248
2010-07-06 11:22 c_schmitz Status resolved => closed
2010-10-25 00:21 c_schmitz Category Data Access => (No Category)
2021-08-12 16:47 guest Bug heat 8 => 10