Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

create_database.php not triggered

  • ritapas
  • ritapas's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 2 months ago #179697 by ritapas
create_database.php not triggered was created by ritapas
Hello,
we are triying to use a customised package for LimeSurvey CE. The difference from the original one is the config.php, the create_database.php script (we need that for this reason ), a couple plugins in the plugin directory and some available templates in upload/themes and upload/admintheme.

The idea is to distribute it on a server where there is a blank limesurvey database. By accessing the {hostname}/limesurvey/admin page with a browser, we expect the create_database script to be triggered and complete the installation.

Though, this doesn't happen.

The page stays blank and a session table is created with 1 row in it.
in the browser a PHPSESSID is created.
This is what we get logged:

2019/01/26 16:51:45 [error] [system.db.CDbCommand] CDbCommand::execute() failed: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'limesurvey.sessions' doesn't exist. The SQL statement executed was: DELETE FROM `sessions` WHERE expire<:expire. Bound with :expire=1548517905.
2019/01/26 16:51:45 [error] [system.db.CDbCommand] CDbCommand::fetchAll() failed: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'limesurvey.settings_global' doesn't exist. The SQL statement executed was: SHOW FULL COLUMNS FROM `settings_global`.
2019/01/26 16:51:45 [error] [system.db.CDbCommand] CDbCommand::fetchAll() failed: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'limesurvey.settings_global' doesn't exist. The SQL statement executed was: SHOW FULL COLUMNS FROM `settings_global`.
2019/01/26 16:51:45 [error] [exception.CDbException] CDbException: The table "{{settings_global}}" for active record class "SettingGlobal" cannot be found in the database. in /var/www/limesurvey/framework/db/ar/CActiveRecord.php:2390
Stack trace:
#0 /var/www/limesurvey/framework/db/ar/CActiveRecord.php(413): CActiveRecordMetaData->__construct(Object(SettingGlobal))
#1 /var/www/limesurvey/framework/db/ar/CActiveRecord.php(682): CActiveRecord->getMetaData()
#2 /var/www/limesurvey/application/models/LSActiveRecord.php(34): CActiveRecord->hasAttribute('created')
#3 /var/www/limesurvey/framework/db/ar/CActiveRecord.php(398): LSActiveRecord->behaviors()
#4 /var/www/limesurvey/application/models/SettingGlobal.php(33): CActiveRecord::model('SettingGlobal')
#5 /var/www/limesurvey/application/helpers/globalsettings_helper.php(23): SettingGlobal::model()
#6 /var/www/limesurvey/application/helpers/globalsettings_helper.php(18): injectglobalsettings()
#7 /var/www/limesurvey/framework/YiiBase.php(321): require('/var/www/limesu...')
#8 /var/www/limesurvey/application/core/LSYii_Application.php(179): YiiBase::import('application.hel...', true)
#9 /var/www/limesurvey/application/core/LSYii_Controller.php(70): LSYii_Application->loadHelper('globalsettings')
#10 /var/www/limesurvey/application/core/LSYii_Controller.php(39): LSYii_Controller->loadHelper('globalsettings')
#11 /var/www/limesurvey/framework/web/CWebApplication.php(359): LSYii_Controller->__construct('admin', NULL)
#12 /var/www/limesurvey/framework/web/CWebApplication.php(276): CWebApplication->createController('')
#13 /var/www/limesurvey/framework/web/CWebApplication.php(141): CWebApplication->runController('admin')
#14 /var/www/limesurvey/framework/base/CApplication.php(185): CWebApplication->processRequest()
#15 /var/www/limesurvey/index.php(194): CApplication->run()
#16 {main}
REQUEST_URI=/limesurvey3/admin/

]


Can anybody help?

Our LS version is 3.15.5, DB is mariadb 5.5.60, httpd 2.4.6, php 7.1 with fastcgi on redhat linux 7.

Thank you all for your kind attention.

Rita
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 2 months ago #179707 by DenisChenu
Replied by DenisChenu on topic create_database.php not triggered
How do you create your script ?

Why not use CLI : manual.limesurvey.org/Installation_using...line_interface_(CLI) ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • ritapas
  • ritapas's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 2 months ago #179708 by ritapas
Replied by ritapas on topic create_database.php not triggered
Hello and thank you for your reply.
Our create-database.php script is quite alike the original one, it just has a
Code:
$oDB->createCommand()->createTable('{{sessions}}', array(
            'id' => "string(32) NOT NULL",
            'expire' => "integer NULL",
            'data' => "LONGBLOB",
        ));

instead of the
Code:
$oDB->createCommand()->createTable('{{sessions}}', array(
            'id' => "string(32) NOT NULL",
            'expire' => "integer NULL",
'data' => "binary",
        ));
statement.


I'll check your suggestion, it looks like something we would use.

Right now I've found the reason for the create-database.php script not being triggered: in our own release we had included the config.php file but by searching in the code (it took a lot since I'm no php developer) I have found that if there is such a file the installer would not be started.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose