Skip to content

Configuration via autoconfig.php fails in Owncloud 4.0.7 w/sqlite #836

Closed

Description

@MTRichards

Transferred from Bug Genie.
http://bugs.owncloud.org/thebuggenie/owncloud/issues/oc-1519

Repeatable with daily build on Dec 11, 2012

Description:
Headless setup of Owncloud instances via autoconfig.php fails due to a fatal error in the sqlite3 adapter. When creating an autoconfig.php (see below) and executing index.php, a fatal error is logged: PHP Fatal error: Call to a member function lastErrorMsg() on a non-object in /var/www/lib/MDB2/Driver/sqlite3.php on line 102 autoconfig.php is unlink()ed successfully, and a config.php is created - however, database creation and population fails, rendering the installation unsuccessfull. After reloading index.php, $_POST is no longer autopopulated by setup.php and the standard installation screen is displayed.

I checked line 102 in sqlite3.php and it says $native_msg = $this->_lasterror

   ? html_entity_decode($this->_lasterror) : $this->connection->lastErrorMsg();

I haven't dug into this very deep, but I presume neither $this->_lasterror nor $this->connection exist and the ternary is therefore false + the fallthrough method is nonexistant.

I commented out the ternary line 102 and replaced it by a simple

 $native_msg = html_entity_decode($this->_lasterror);

After this, autosetup runs flawlessly.

icon_edit.png Reproduction steps:
I have created an autoconfig.php file with the following content on my test machine:

false, 'adminlogin' => 'admin', 'adminpass' => 'changeme', 'directory' => '/var/www/data', 'dbtype' => 'sqlite', 'dbname' => 'owncloud.db', 'dbtableprefix' => 'oc_', ); ?>

Activity

  1. VicDeo commented on Dec 13, 2012

    @VicDeo
    Contributor

    Possible duplicate of #787

  2. locked as resolved and limited conversation to collaborators on Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions