🐘 config.manyhosts.inc.php (Php) 2.1 KB 2016-06-23
PHP module for config.manyhosts.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | <?php
/**
* This example configuration shows how to configure phpMyAdmin for
* many hosts that all have identical configuration otherwise. To add
* a new host, just drop it into $hosts below. Contributed by
* Matthew Hawkins.
*
* @package PhpMyAdmin
* @subpackage Example
*/
$i=0;
$hosts = array (
"foo.example.com",
"bar.example.com",
"baz.example.com",
"quux.example.com",
);
foreach ($hosts as $host) {
$i++;
$cfg['Servers'][$i]['host'] = $host;
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['only_db'] = '';
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
... [truncated, 4 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "config.manyhosts.inc.php",
"description": "PHP module for config.manyhosts.inc",
"dateModified": "2016-06-23",
"dateCreated": "2025-03-23",
"contentSize": "2.1 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/buzzerstar/manage/web23/examples/config.manyhosts.inc.php",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Php"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/buzzerstar/manage/web23/examples/"
}
🐘 openid.php (Php) 4.4 KB 2016-06-23
PHP module for openid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | <?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Single signon for phpMyAdmin using OpenID
*
* This is just example how to use single signon with phpMyAdmin, it is
* not intended to be perfect code and look, only shows how you can
* integrate this functionality in your application.
*
* It uses OpenID pear package, see https://pear.php.net/package/OpenID
*
* User first authenticates using OpenID and based on content of $AUTH_MAP
* the login information is passed to phpMyAdmin in session data.
*
* @package PhpMyAdmin
* @subpackage Example
*/
if (false === @include_once 'OpenID/RelyingParty.php') {
exit;
}
/**
* Map of authenticated users to MySQL user/password pairs.
*/
$AUTH_MAP = array(
'https://launchpad.net/~username' => array(
'user' => 'root',
'password' => '',
),
);
/**
* Simple function to show HTML page with given content.
*
* @param string $contents Content to include in page
*
* @return void
*/
function Show_page($contents)
{
header('Content-Type: text/html; charset=utf-8');
echo '<?xml version="1.0" encoding="utf-8"?>' , "\n";
?>
<!DOCTYPE HTML>
<html lang="en" dir="ltr">
<head>
<link rel="icon" href="../favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta charset="utf-8" />
... [truncated, 117 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "openid.php",
"description": "PHP module for openid",
"dateModified": "2016-06-23",
"dateCreated": "2025-03-23",
"contentSize": "4.4 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/buzzerstar/manage/web23/examples/openid.php",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Php"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/buzzerstar/manage/web23/examples/"
}
🐘 signon-script.php (Php) 801 bytes 2016-06-23
PHP module for signon script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 | <?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Single signon for phpMyAdmin
*
* This is just example how to use script based single signon with
* phpMyAdmin, it is not intended to be perfect code and look, only
* shows how you can integrate this functionality in your application.
*
* @package PhpMyAdmin
* @subpackage Example
*/
/**
* This function returns username and password.
*
* It can optionally use configured username as parameter.
*
* @param string $user User name
*
* @return array
*/
function get_login_credentials($user)
{
/* Optionally we can use passed username */
if (!empty($user)) {
return array($user, 'password');
}
/* Here we would retrieve the credentials */
$credentials = array('root', '');
return $credentials;
}
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "signon-script.php",
"description": "PHP module for signon script",
"dateModified": "2016-06-23",
"dateCreated": "2025-03-23",
"contentSize": "801 bytes",
"contentUrl": "https://www.artikelschreiber.com/opensource/buzzerstar/manage/web23/examples/signon-script.php",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Php"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/buzzerstar/manage/web23/examples/"
}
🐘 signon.php (Php) 2.4 KB 2016-06-23
PHP module for signon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52 | <?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Single signon for phpMyAdmin
*
* This is just example how to use session based single signon with
* phpMyAdmin, it is not intended to be perfect code and look, only
* shows how you can integrate this functionality in your application.
*
* @package PhpMyAdmin
* @subpackage Example
*/
/* Need to have cookie visible from parent directory */
session_set_cookie_params(0, '/', '', false);
/* Create signon session */
$session_name = 'SignonSession';
session_name($session_name);
// Uncomment and change the following line to match your $cfg['SessionSavePath']
//session_save_path('/foobar');
session_start();
/* Was data posted? */
if (isset($_POST['user'])) {
/* Store there credentials */
$_SESSION['PMA_single_signon_user'] = $_POST['user'];
$_SESSION['PMA_single_signon_password'] = $_POST['password'];
$_SESSION['PMA_single_signon_host'] = $_POST['host'];
$_SESSION['PMA_single_signon_port'] = $_POST['port'];
/* Update another field of server configuration */
$_SESSION['PMA_single_signon_cfgupdate'] = array('verbose' => 'Signon test');
$id = session_id();
/* Close that session */
session_write_close();
/* Redirect to phpMyAdmin (should use absolute URL here!) */
header('Location: ../index.php');
} else {
/* Show simple form */
header('Content-Type: text/html; charset=utf-8');
echo '<?xml version="1.0" encoding="utf-8"?>' , "\n";
?>
<!DOCTYPE HTML>
<html lang="en" dir="ltr">
<head>
<link rel="icon" href="../favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta charset="utf-8" />
<title>phpMyAdmin single signon example</title>
</head>
<body>
... [truncated, 22 more lines] ...
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "signon.php",
"description": "PHP module for signon",
"dateModified": "2016-06-23",
"dateCreated": "2025-03-23",
"contentSize": "2.4 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/buzzerstar/manage/web23/examples/signon.php",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "Php"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/buzzerstar/manage/web23/examples/"
}
📇 swekey.sample.conf (C) 1.5 KB 2016-06-23
Source code file for swekey.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 | # This is a typical file used to enable Swekey hardware authentication.
#
# To activate the Swekey authentication add the following line to your config.inc.php file.
# $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';
# Then rename this file "swekey-pma.conf" and copy it to the /etc directory.
# Add all the Swekey ids you want to grant access to in the file.
# After each Swekey id put the corresponding user name.
#
# If you don't know the id of a Swekey just visit http://www.swekey.com?sel=support
# while your Swekey is connected.
#
# If you need to purchase a Swekey please visit https://www.phpmyadmin.net/auth_key/
# since this link provides funding to PhpMyAdmin.
#
0000000000000000000000000000763A:root
000000000000000000000000000089E4:steve
0000000000000000000000000000231E:scott
#
# It is recommended to include the following lines to contact the
# authentication servers in SSL mode.
#
SERVER_CHECK=https://auth-check-ssl.musbe.net
SERVER_RNDTOKEN=https://auth-rnd-gen-ssl.musbe.net
SERVER_STATUS=https://auth-status-ssl.musbe.net
#
# The path of the root certificate file used to ensure a secure
# communication with the authentication servers in SSL mode.
# If not specified, will use musbe-ca.crt found in your
# phpMyAdmin/libraries/auth/swekey.
#
#CA_FILE=/var/http-root/phpmyadmin/libraries/auth/swekey/musbe-ca.crt
#
# If your server receives many login requests, you can enable the random
# token caching to accelerate the authentication process.
# Token caching is enabled by default.
#
#ENABLE_TOKEN_CACHE=0
|
{
"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"name": "swekey.sample.conf",
"description": "Source code file for swekey.sample",
"dateModified": "2016-06-23",
"dateCreated": "2025-03-23",
"contentSize": "1.5 KB",
"contentUrl": "https://www.artikelschreiber.com/opensource/buzzerstar/manage/web23/examples/swekey.sample.conf",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "C"
},
"codeRepository": "https://www.artikelschreiber.com/opensource/buzzerstar/manage/web23/examples/"
}