Jump to:

10987 Posts in 2724 Topics by 1817 members

All other Modules

SilverStripe Forums » All other Modules » SQLite3 + [User Error] Couldn't run query: VACUUM | not authorized POST /install.php

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2413 Views
  • astate
    Avatar
    Community Member
    35 Posts

    SQLite3 + [User Error] Couldn't run query: VACUUM | not authorized POST /install.php Link to this post

    Hello, I want use SQLite but i can't install it.

    all right are ok

    # Setting up 'mysite/_config.php'...
    # Setting up /srv/http/mysite/_config.php
    # Setting up '.htaccess' file...
    # Setting up /srv/http/.htaccess
    # Building database schema...

    [User Error] Couldn't run query: VACUUM | not authorized
    POST /install.php

    619    function databaseError($msg, $errorLevel = E_USER_ERROR) {
    620       user_error($msg, $errorLevel);
    621    }
    622    
    623    /**
    624     * Enable supression of database messages.
    625     */
    626    function quiet() {

  • apiening
    Avatar
    Community Member
    55 Posts

    Re: SQLite3 + [User Error] Couldn't run query: VACUUM | not authorized POST /install.php Link to this post

    hi astate,

    this is a sqlite level error: http://www.sqlite.org/tclsqlite.html#authorizer

    something registered an authorizer callback function which returns a SQLITE_DENY for VACUUM. your options are:

    1. check the registered callback to see if you can aquire authorization
    2. overide the callback (e.g. with a NULL callback or with one that returns SQLITE_IGNORE instead of SQLITE_DENY)
    3. comment the VACUUM command in SQLite3Database.php

    the last option is a hack and not recommended. it's not absolutely neccessary to vacuum. can you find out why there is authorization required? is there any other command that gets a SQLITE_DENY? if there is a good reason for the denial i can make vacuuming optional.

    cheers

    andy

  • damnmab
    Avatar
    Community Member
    2 Posts

    Re: SQLite3 + [User Error] Couldn't run query: VACUUM | not authorized POST /install.php Link to this post

    Hi,
    Silverstripe seems interesting and I would really like to get it running to play around with it some, but I keep having this error message during installation (see attached image).
    I added the sqlite trunk module before installation and it showed as green in the list.
    Did I miss something? Is sqlite3 broken or not and why is it failing to install?

    Attached Files
  • apiening
    Avatar
    Community Member
    55 Posts

    Re: SQLite3 + [User Error] Couldn't run query: VACUUM | not authorized POST /install.php Link to this post

    hi damnmab,

    1) what sqlite version are you using?
    2) are you on a shared host?
    3) can you try commenting:

    // $this->query('VACUUM');


    in sqlite3/code/SQLite3Database.php? (for testing only)

    if (3) fixes the issue let me know. i will make the execution of VACUUM configurable then.

    cheers

    andy

  • damnmab
    Avatar
    Community Member
    2 Posts

    Re: SQLite3 + [User Error] Couldn't run query: VACUUM | not authorized POST /install.php Link to this post

    Hi andy,

    Thanks for your quick reply.

    1) phpinfo() shows under pdo_sqlite that SQLite Library version is 3.3.7
    2) Yes, I am.
    3) When commenting that line the installation runs with no errors!

    Thanks,
    damnmab

  • apiening
    Avatar
    Community Member
    55 Posts

    Re: SQLite3 + [User Error] Couldn't run query: VACUUM | not authorized POST /install.php Link to this post

    Hi damnmab,

    thanks for the update. I made the vacuuming configurable and updated trunk. After updating your local sqlite3 module you can add:

    SQLite3Database::$vacuum = false;

    anywhere in your mysite/_config.php to turn off vacuuming.

    Cheers

    Andy

    2413 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.