mirror of
https://github.com/vrana/adminer.git
synced 2025-08-06 06:37:33 +02:00
Updated Enable sqlite3 (markdown)
@@ -7,9 +7,56 @@ Comment out `AdminerLoginServers` if it is present in the index.php
|
||||
// ]),
|
||||
```
|
||||
|
||||
## Create / edit index.php to enable plugins and enable the sqlite login plugin
|
||||
|
||||
```
|
||||
<?php
|
||||
# index.php
|
||||
function adminer_object()
|
||||
{
|
||||
// Required to run any plugin.
|
||||
include_once "./plugins/plugin.php";
|
||||
|
||||
// Plugins auto-loader.
|
||||
foreach (glob("plugins/*.php") as $filename) {
|
||||
include_once "./$filename";
|
||||
}
|
||||
|
||||
// Specify enabled plugins here.
|
||||
$plugins = [
|
||||
|
||||
// show / allow list of servers by commenting this out...
|
||||
// new AdminerLoginServers([
|
||||
// filter_input(INPUT_SERVER, 'HTTP_HOST') => filter_input(INPUT_SERVER, 'SERVER_NAME')
|
||||
// ]),
|
||||
|
||||
// allow sqlite with login-sqlite plugin and selecting sqlite3 server type and put full path to sqlite database file in database field.
|
||||
new AdminerLoginSqlite(),
|
||||
|
||||
];
|
||||
|
||||
return new AdminerPlugin($plugins);
|
||||
}
|
||||
|
||||
// Include original Adminer or Adminer Editor.
|
||||
include "./adminer.php";
|
||||
```
|
||||
## Edit the plugins/login-sqlite3.php
|
||||
|
||||
Get this file in place it in `plugins/`
|
||||
`https://raw.github.com/vrana/adminer/master/plugins/login-sqlite.php`
|
||||
|
||||
Edit this line
|
||||
|
||||
`if (DRIVER != "sqlite" && DRIVER != "sqlite2") {`
|
||||
|
||||
to be
|
||||
|
||||
`if (DRIVER != "sqlite3" && DRIVER != "sqlite2") {`
|
||||
|
||||
## Select sqlite3 in the system field.
|
||||
|
||||
Username and Password are removed from the login form.
|
||||
Select sqlite3.
|
||||
|
||||
## Fill in the Database field
|
||||
|
||||
|
Reference in New Issue
Block a user