Dependency Graph
View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
06259 | Bug reports | Installation | public | 2012-06-22 21:54 | 2012-07-26 21:52 |
Reporter | TMSWhite | Assigned To | c_schmitz | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.00RC4 | ||||
Fixed in Version | 2.00RC7 | ||||
Summary | 06259: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ls2.lime_surveys' doesn't exist | ||||
Description | Occurs when get to "Database settings" step of fresh install | ||||
Additional Information | PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ls2.lime_surveys' doesn't exist in C:\xampp\htdocs\ls2\framework\db\CDbCommand.php on line 497 Call Stack #TimeMemoryFunctionLocation 10.0012355224{main}( )..\index.php:0 20.02942021360CApplication->run( )..\index.php:171 30.02942021360CWebApplication->processRequest( )..\CApplication.php:162 40.03052021488CWebApplication->runController( )..\CWebApplication.php:135 50.04052790456InstallerController->run( )..\CWebApplication.php:276 60.05494926912InstallerController->stepDatabaseConfiguration( )..\InstallerController.php:70 70.13856653144CDbCommand->queryAll( )..\InstallerController.php:296 80.13856653520CDbCommand->queryInternal( )..\CDbCommand.php:390 90.13876655128PDOStatement->execute( )..\CDbCommand.php:497 ( ! ) CDbException: CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ls2.lime_surveys' doesn't exist. The SQL statement executed was: SELECT * FROM | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 4 | ||||
Complete LimeSurvey version number (& build) | 120624 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | Mysql 5.3 | ||||
Server OS (if known) | Windows XP | ||||
Webserver software & version (if known) | XAMPP | ||||
PHP Version | 5.3 | ||||
I am sorry. I can't reproduce this here. Looks like for some reason the tables in your database are not created? Can you check? |
|
This happens before the tables are created. When I do the install, I create the database first (since users don't have create database permissions). This error occurs at the step that says "the database exists - do you want to populate it?" |
|
Sorry, I cannot reproduce. Works just fine. I assume something is terribly off with your system considering the other bugs you reported, too. Nobody else reported this issue, either. So unless you debug yourself or come up with some new info regarding this I will have to close this issue because it is not reproducable for me. |
|
I just did a clean checkout from Git and a clean install, and I get the same error. The problem may be in Yii. The error is generated by lines 518-530 of CDbCommand.php:
Which is called by lines 293-301 of InstallerController.php:
So, even though the try/catch clause detects that the tables do not exist, the Yii::log() sub-system writes the log to the screen. Is that something we can control? |
|
The try/catch should catch it, and it does that here just fine, so I am still wondering why it doesn't do that on your system? I have display_errors = On set in php.ini. I still guess it is some configuration issue on your server. |
|
try/catch does catch it; however, CDbCommand's try/catch grabs it first and adds it to the logging system. So, although InstallerController's try/catch works fine, Yii::log() still shows it to the screen, and thus breaks the JSON response used for listing surveys. I spent a while looking, but couldn't find an easy way to turn off the Yii logging system or get it to write to disk. I'm sure there is a way, but it wasn't obvious. |
|
See http://www.yiiframework.com/doc/guide/1.1/en/topics.logging |
|
Anything? |
|
I spent a little while trying to figure out the logging, but it wasn't very intuitive. Without logging customizations (e.g. with the default configuration), I still get the same error. This one I can live with, but this is also the root problem for 06162 - I still can't list surveys in 2.0 despite multiple fresh re-installs of LS 2.0 If this starts to affect other people, I'd recommend adding in default logging that fixes this specific problem. |
|
Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9133 |
|
TMSWHite: Please check if it is working now. By default the YII debug mode is now deactivated. You can simply activate it for dev purposes by setting the debug param in config.php after installation or whenever it suits you. |
|
Now I get a new set of errors when I do a fresh install (see attached screen shots). I double checked my php.ini file, and it does not have any debugging turned on. |
|
Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9146 |
|
Try again now, please. |
|
OK, that fixes the config.php errors, but I still get the original error from the database step - see newest screenshot |
|
Can you check (if necessary by inserting the code in the framework) what value the YII_DEBUG constant has when the error is thrown? |
|
From what I can see is that an exception is caugth by the framework, which then throws another exception, which then should be caught by the try/catch |
|
Lines 293-301 do catch the error, and the value of YII_DEBUG is false when that error is caught. The problem stems from lines 350-356 and 518-530 of CDbCommand.php, specifically: Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.', array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand'); Oddly, however, if I surround the Yii::log() blocks with if (YII_DEBUG) { }, they are never called, yet I still see the log message. Hmm, actually, is this line (528) in the CDbCommand.php that is the problem: throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}', ('{error}'=>$message)),(int)$e->getCode(),$errorInfo); Although that exception is caught, somehow it generates a log message anyway. I am using PHP Version 5.3.5 |
|
Perhaps it is a version issue. I just installed XAMPP 1.8.0, which uses PHP 5.4.4, and everything now works fine. Wierd. If it is a PHP 5.3 issue (or a 5.3.5 issue), it would be nice to caution users (and/or let them know that an upgrade can fix it). I don't have time to test other PHP 5.3 versions, so perhaps others can report which 5.3 versions are known to work properly with LS 2.0 |
|
This one comes close: https://bugs.php.net/bug.php?id=52890 It's not exactly clear in what version this was finally fixed. It might also be a later silent fix-fix. Anyway, if someone comes around with this kind of bug we know where it comes from so at least something good came out of this. |
|
Fixed by PHP version upgrade |
|
LimeSurvey: Yii cca7b1f4 2012-07-25 23:47:23 Details Diff |
Fixed issue 06259: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ls2.lime_surveys' doesn't exist Dev Please note that developers have to manually set debug paramter to 1 or 2 in config.php now to see all errors |
Affected Issues 06259 |
|
mod - application/controllers/InstallerController.php | Diff File | ||
mod - application/core/LSYii_Controller.php | Diff File | ||
mod - index.php | Diff File | ||
LimeSurvey: Yii a6b43b46 2012-07-25 23:59:25 Details Diff |
Fixed issue 06259: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ls2.lime_surveys' doesn't exist Dev Please note that developers have to manually set debug paramter to 1 or 2 in config.php now to see all errors |
Affected Issues 06259 |
|
mod - application/core/LSYii_Controller.php | Diff File | ||
mod - index.php | Diff File | ||
LimeSurvey: Yii be5fced4 2012-07-26 09:04:37 Details Diff |
Fixed issue 06259: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ls2.lime_surveys' doesn't exist |
Affected Issues 06259 |
|
mod - index.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-06-22 21:54 | TMSWhite | New Issue | |
2012-06-22 23:26 | c_schmitz | Note Added: 19494 | |
2012-06-22 23:26 | c_schmitz | Assigned To | => c_schmitz |
2012-06-22 23:26 | c_schmitz | Status | new => feedback |
2012-06-24 03:22 | TMSWhite | Note Added: 19534 | |
2012-06-24 03:22 | TMSWhite | Status | feedback => assigned |
2012-07-06 10:08 | c_schmitz | Note Added: 19636 | |
2012-07-06 10:09 | c_schmitz | Note Edited: 19636 | |
2012-07-06 10:09 | c_schmitz | Status | assigned => feedback |
2012-07-07 22:44 | TMSWhite | Note Added: 19676 | |
2012-07-07 22:44 | TMSWhite | Status | feedback => assigned |
2012-07-07 23:13 | TMSWhite | Relationship added | related to 06263 |
2012-07-07 23:14 | TMSWhite | Relationship added | related to 06162 |
2012-07-18 13:46 | c_schmitz | Note Added: 19750 | |
2012-07-18 13:46 | c_schmitz | Status | assigned => feedback |
2012-07-18 15:11 | TMSWhite | Note Added: 19756 | |
2012-07-18 15:11 | TMSWhite | Status | feedback => assigned |
2012-07-18 16:13 | c_schmitz | Note Added: 19768 | |
2012-07-18 16:13 | c_schmitz | Status | assigned => feedback |
2012-07-24 20:21 | c_schmitz | Note Added: 19951 | |
2012-07-24 20:38 | TMSWhite | Note Added: 19953 | |
2012-07-24 20:38 | TMSWhite | Status | feedback => assigned |
2012-07-26 08:47 | c_schmitz | Changeset attached | => LimeSurvey Yii cca7b1f4 |
2012-07-26 08:47 | c_schmitz | Note Added: 19969 | |
2012-07-26 08:47 | c_schmitz | Resolution | open => fixed |
2012-07-26 08:49 | c_schmitz | Note Added: 19970 | |
2012-07-26 08:49 | c_schmitz | Status | assigned => feedback |
2012-07-26 08:59 | c_schmitz | Changeset attached | => LimeSurvey Yii a6b43b46 |
2012-07-26 11:10 | c_schmitz | Note Edited: 19970 | |
2012-07-26 16:55 | TMSWhite | Note Added: 19989 | |
2012-07-26 16:55 | TMSWhite | Status | feedback => assigned |
2012-07-26 16:55 | TMSWhite | File Added: ls2rc7-install-error-1.jpg | |
2012-07-26 16:56 | TMSWhite | File Added: ls2rc7-install-error-2.jpg | |
2012-07-26 16:56 | TMSWhite | File Added: ls2rc7-install-error-3.jpg | |
2012-07-26 16:56 | TMSWhite | File Added: ls2rc7-install-error-4.jpg | |
2012-07-26 18:04 | c_schmitz | Changeset attached | => LimeSurvey Yii be5fced4 |
2012-07-26 18:04 | c_schmitz | Note Added: 19990 | |
2012-07-26 18:04 | c_schmitz | Note Added: 19991 | |
2012-07-26 18:05 | c_schmitz | Status | assigned => feedback |
2012-07-26 18:20 | TMSWhite | Note Added: 19992 | |
2012-07-26 18:20 | TMSWhite | Status | feedback => assigned |
2012-07-26 18:20 | TMSWhite | File Added: ls2rc7-install-error-5.jpg | |
2012-07-26 19:38 | c_schmitz | Note Added: 19993 | |
2012-07-26 19:39 | c_schmitz | Note Edited: 19993 | |
2012-07-26 19:44 | c_schmitz | Note Added: 19994 | |
2012-07-26 20:50 | TMSWhite | Note Added: 19995 | |
2012-07-26 21:43 | TMSWhite | Note Added: 19996 | |
2012-07-26 21:49 | c_schmitz | Note Added: 19997 | |
2012-07-26 21:52 | TMSWhite | Note Added: 19998 | |
2012-07-26 21:52 | TMSWhite | Status | assigned => closed |
2012-07-26 21:52 | TMSWhite | Fixed in Version | => 2.00RC7 |