镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
This repository was archived by the owner on Jul 11, 2021. It is now read-only.
This repository was archived by the owner on Jul 11, 2021. It is now read-only.

extension load #104

Open
Open

Description

@lefedor

Hello, is it possible loading extensions into REDISQL?

like:
db.enable_load_extension(True)
db.load_extension('./spellfix')

I'm trying
$ret = $redis->rawCommand('REDISQL.EXEC', $DbName, "SELECT load_extension('./spellfix');");
and getting
Fatal error: Uncaught exception 'RedisException' with message 'not authorized' in /opt/www/htdocs/www/wDb.php:794 Stack trace: #0 /opt/www/htdocs/www/wDb.php(794): Redis->rawcommand('REDISQL.EXEC', 'Db_1_2', 'SELECT load_ext...') #1 {main} thrown in /opt/www/htdocs/www/wDb.php on line 794

Activity

  1. siscia commented on Jul 31, 2020

    @siscia
    Member

    Hummmm, I thought about this, but I never get to implement it.

    The not authorized does not seems a redis / redisql exception, so maybe the problem is not strictly related to redisql.

    Can you try to use the redis-cli and do the same?

  2. lefedor commented on Jul 31, 2020

    @lefedor
    Author

    cli dialogue:

    127.0.0.1:6379> REDISQL.CREATE_DB wtesta
    OK
    127.0.0.1:6379> REDISQL.EXEC 'wtesta' "SELECT load_extension('./spellfix');"
    (error) not authorized
    127.0.0.1:6379> REDISQL.EXEC wtesta "SELECT load_extension('./spellfix');"
    (error) not authorized
    127.0.0.1:6379> REDISQL.EXEC wtesta "SELECT load_extension('./spellfix.so');"
    (error) not authorized

    127.0.0.1:6379> REDISQL.EXEC wtesta "SELECT enable_load_extension(1);"
    (error) no such function: enable_load_extension
    127.0.0.1:6379> REDISQL.EXEC wtesta "SELECT enable_load_extension(true);"
    (error) no such function: enable_load_extension

  3. siscia commented on Jul 31, 2020

    @siscia
    Member

    Sorry, I thought I added a comment.

    The problem is that we the loading of extensions need to be enable with: https://www.sqlite.org/c3ref/enable_load_extension.html

    Can you fix the code yourself? If so a PR would be very great!

  4. lefedor commented on Jul 31, 2020

    @lefedor
    Author

    Yes, I've used enable_load_extension but it's unavailable over current api.
    I'm not sure i'll do hotfix properly on this.

  5. siscia commented on Jul 31, 2020

    @siscia
    Member

    Unfortunately I am in vacations the coming week.

    If you can open a PR I will review and merge it next weekm

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions