plugin:authmysql
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:authmysql [2015-07-30 12:22] – 101.231.32.50 | plugin:authmysql [2024-02-10 22:58] (current) – Klap-in | ||
---|---|---|---|
Line 7: | Line 7: | ||
type : Auth | type : Auth | ||
lastupdate : 2014-02-15 | lastupdate : 2014-02-15 | ||
- | compatible : (bundled) | + | compatible : (bundled |
depends | depends | ||
conflicts | conflicts | ||
similar | similar | ||
- | tags : !bundled | + | tags : !discontinued |
downloadurl: | downloadurl: | ||
- | bugtracker : # eg. https:// | + | bugtracker : # eg. https:// |
- | sourcerepo : https:// | + | sourcerepo : https:// |
donationurl: | donationurl: | ||
---- | ---- | ||
+ | :!: **The authMySQL plugin is **[[devel: | ||
===== Description ===== | ===== Description ===== | ||
Line 28: | Line 28: | ||
===== Usage ===== | ===== Usage ===== | ||
Before this plugin can be used, you need to setup some settings: | Before this plugin can be used, you need to setup some settings: | ||
- | - Activate the authMySQL plugin in the [[plugin|Plugin | + | - Activate the authMySQL plugin in the [[plugin:extension|Extension |
- Define the database in the [[config|Configuration Manager]] | - Define the database in the [[config|Configuration Manager]] | ||
- Define also the statements that performs the authentication and administration actions. | - Define also the statements that performs the authentication and administration actions. | ||
Line 57: | Line 57: | ||
* [[plugin: | * [[plugin: | ||
* [[plugin: | * [[plugin: | ||
+ | * [[plugin: | ||
* [[plugin: | * [[plugin: | ||
* [[plugin: | * [[plugin: | ||
Line 83: | Line 84: | ||
If you setup authmysql plugin configuration using [[plugin: | If you setup authmysql plugin configuration using [[plugin: | ||
- | The common settings for AuthMySQL plugin will be found in '' | + | The common settings for AuthMySQL plugin will be found in '' |
<code php conf/ | <code php conf/ | ||
Line 120: | Line 121: | ||
- | All options explained assuming to use with a [[#example database|Sample Database]] which stores the first and last name of the users in one field. The common example for AuthMySQL plugin -- '' | + | All options explained assuming to use with a [[#example database|Sample Database]] which stores the first and last name of the users in one field. The common example for AuthMySQL plugin -- '' |
Line 600: | Line 601: | ||
===== Issues ===== | ===== Issues ===== | ||
- | For reporting issues about this AuthMySQL plugin, please refer to https:// | + | For reporting issues about this AuthMySQL plugin, please refer to https:// |
- | ===== Discussion | + | ===== PHP 7 & MYSQLI |
+ | Unfortunately this plugin does not work with PHP7, which has deprecated all the **MYSQL_ ** functions. | ||
+ | |||
+ | Here's the stock authmysql file, updated to mysqli: [[https:// | ||
+ | |||
+ | It's probably a dangerous chunk of code, so you shouldn' | ||
+ | |||
+ | <code php> | ||
+ | if(!$this-> | ||
+ | $con = mysqli_connect($this-> | ||
+ | if($con) { | ||
+ | // if((if (mysqli_connect_errno()) mysqli_select_db($this-> | ||
+ | if((preg_match('/ | ||
+ | $this-> | ||
+ | $this-> | ||
+ | $this-> | ||
+ | } | ||
+ | $this-> | ||
+ | if($this-> | ||
+ | | ||
+ | } | ||
+ | return true; // connection and database successfully opened | ||
+ | |||
+ | |||
+ | } else { | ||
+ | $this-> | ||
+ | "MySQL err: Connection to {$this-> | ||
+ | -1, __LINE__, __FILE__ | ||
+ | ); | ||
+ | } | ||
+ | |||
+ | return false; // connection failed | ||
+ | } | ||
+ | return true; // connection already open | ||
+ | }</ | ||
+ | |||
+ | --- [[user> | ||
+ | |||
+ | ===== Discussion ===== | ||
**Wishlist** | **Wishlist** |
plugin/authmysql.1438251760.txt.gz · Last modified: 2015-07-30 12:22 by 101.231.32.50