bkidwell/adminer-sqlite-login
Composer 安装命令:
composer require bkidwell/adminer-sqlite-login
包简介
Login plugin for Adminer to access SQLite databases authenticated with a global password.
README 文档
README
This project provides a login plugin for Adminer to access SQLite databases in Adminer, which is a PHP web application for no-nonsense database administration. The plugin allows you to set a global password for all database types that don't support their own authentication mechanism.
Installing Adminer and this Plugin Using Composer
Pre-requisites:
- PHP
- Composer
- PHP and Composer available in your
$PATHenvironment variable.
Installation:
cd $PROJECTS
composer create-project bkidwell/adminer-sqlite-login
cd adminer-sqlite-login
composer install
php vendor/vrana/adminer/compile.php
php src/AdminerLoginSqlite.php setpassword
# Your password hash will be stored in src/AdminerLoginSqlite.conf.php .
To start Adminer:
cd $ADMINER # the folder where you installed adminer-login-sqlite
# change "8000" to your preferred port
php -d display_errors=1 -S localhost:8000 -t src
Alternative Installation without Using Composer
Pre-requisites:
- PHP
- PHP available in your
$PATHenvironment variable.
Installation:
- Create a project folder, hereafter referred to as
$ADMINER. - Get a single-file Adminer build from https://www.adminer.org/en/#download and save it in
$ADMINERasadminer.php. - Copy plugin.php from the Adminer source code repository to
$ADMINER. - Copy AdminerSqliteLogin.php from its source code repository to
$ADMINER. Create
$ADMINER/index.phpas follows:<?php require_once './AdminerLoginSqlite.php'; function adminer_object() { require_once './plugin.php'; return new AdminerPlugin([ // specify enabled plugins here new AdminerLoginSqlite(), ]); } require 'adminer.php';Set your password:
cd $ADMINER # Your password hash will be stored in AdminerLoginSqlite.conf.php . php AdminerLoginSqlite.php setpassword
You should have 4 files in $ADMINER now:
adminer.phpplugin.phpAdminerSqliteLogin.phpindex.php
To start Adminer:
cd $ADMINER
# change "8000" to your preferred port
php -d display_errors=1 -S localhost:8000 -t .
Logging in
| System: | SQLite 3 |
| Username: | leave blank |
| Password: | the password you set with the setpassword command |
| Database: | absolute path to your database |
Don't forget if you need to start with an empty SQLite file, a zero-lenght file is a valid SQLite database:
touch /home/user/databases/project.sqlite3
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2021-10-17