Adminer 4-6-3 + Sqlite work well with this adminer.php file :
<?phpfunctionadminer_object(){include_once"./plugins/plugin.php";include_once"./plugins/login-password-less.php";returnnewAdminerPlugin(array(// TODO: inline the result of password_hash() so that the password is not visible in source codesnewAdminerLoginPasswordLess(password_hash("toto",PASSWORD_DEFAULT)),));}// include original Adminer or Adminer Editorinclude"./adminer-4.6.3.php";
it's work well
But, I can't do work adminer editor 4-6-3 + Sqlite
I tried this file editor.php (similar with adminer.php )
<?phpfunctionadminer_object(){include_once"./plugins/plugin.php";include_once"./plugins/login-password-less.php";returnnewAdminerPlugin(array(// TODO: inline the result of password_hash() so that the password is not visible in source codesnewAdminerLoginPasswordLess(password_hash("toto",PASSWORD_DEFAULT)),));}// include original Adminer or Adminer Editorinclude"./editor-4.6.3.php";
I obtain a green error message : "The action will be performed after successfull login with the same credentials."
I tried a version with login et loginForm functions :
<?phpfunctionadminer_object(){include_once"./plugins/plugin.php";include_once"./plugins/login-password-less.php";classAdminerSoftwareextendsAdminer{functiondatabase(){// database name, will be escaped by Adminerreturn'db.sqlite';}functionlogin($login,$password){// validate user submitted credentialsreturn($login=='toto'&&$password=='toto');}functionloginForm(){?><tablecellspacing="0"><tr><th><?phpecholang('Username');?><td><inputtype="text"name="auth[driver]"value="sqlite"><inputtype="text"name="auth[server]"value=""><inputid="username"name="auth[username]"value="<?php echo h($_GET["username"]); ?>"><tr><th><?phpecholang('Password');?><td><inputtype="password"name="auth[password]""></table><?phpecho "<p><inputtype='submit'value='" . lang('Login') . "'>\n";echo checkbox("permanent", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";} } return new AdminerSoftware;}include "./editor-4.6.3.php";
I obtain a red error message : Database does not support password.
Is there a default configuration to use Sqlite and editor-4.6.3.php ?
Many thanks
edit 20:40 for typo
Last edit: DUV 2018-08-28
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
<?phpfunctionadminer_object(){include_once"../plugins/plugin.php";include_once"../plugins/login-password-less.php";classAdminerSqliteextendsAdminerPlugin{functionloginFormField($name,$heading,$value){return$heading.($name=='username'?preg_replace('~"server"~','"sqlite"',$value):$value);}functiondatabase(){return'db.sqlite';}}returnnewAdminerSqlite(array(// TODO: inline the result of password_hash() so that the password is not visible in source codesnewAdminerLoginPasswordLess(password_hash("YOUR_PASSWORD_HERE",PASSWORD_DEFAULT)),));}include"./index.php";
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
/var/log/apache2/errors.log give a : PHP Warning: Declaration of AdminerPlugin::dumpTable($table, $style, $is_view = 0) should be compatible with Adminer::dumpTable() in /mnt/nas/plugins/plugin.php on line 0
but it works !
many thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Adminer 4-6-3 + Sqlite work well with this adminer.php file :
it's work well
But, I can't do work adminer editor 4-6-3 + Sqlite
I tried this file editor.php (similar with adminer.php )
I obtain a green error message : "The action will be performed after successfull login with the same credentials."
I tried a version with login et loginForm functions :
I obtain a red error message : Database does not support password.
Is there a default configuration to use Sqlite and editor-4.6.3.php ?
Many thanks
edit 20:40 for typo
Last edit: DUV 2018-08-28
This is one option:
Hello,
Thanks to your example.
I have done the same, with terminating by :
/var/log/apache2/errors.log give a :
PHP Warning: Declaration of AdminerPlugin::dumpTable($table, $style, $is_view = 0) should be compatible with Adminer::dumpTable() in /mnt/nas/plugins/plugin.php on line 0
but it works !
many thanks
Sorry, I don't see how to check as [SOLVED]
The warning is probably caused by using an old
plugin.php
, please update it.