support for encrypted and compressed connections
This commit is contained in:
@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2003-01-31 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
|
* config.inc.php3, Documentation.html, libraries/common.lib.php3,
|
||||||
|
libraries/config_import.lib.php3: Added experimental support for encrypted
|
||||||
|
and compressed connections to the MySQL server.
|
||||||
|
|
||||||
2003-01-30 Marc Delisle <lem9@users.sourceforge.net>
|
2003-01-30 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* db_details_structure.php3, libraries/fpdf/fpdf.php3: better browser
|
* db_details_structure.php3, libraries/fpdf/fpdf.php3: better browser
|
||||||
support, thanks to Jose Fandos (jose.fandos at sonnd.com)
|
support, thanks to Jose Fandos (jose.fandos at sonnd.com)
|
||||||
|
@@ -513,6 +513,22 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
|
|||||||
<br /><br />
|
<br /><br />
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
<dt><b>$cfg['Servers'][$i]['ssl']</b> boolean</dt>
|
||||||
|
<dd>
|
||||||
|
Wheather to use an SSL connection to the MySQL server or not
|
||||||
|
(experimental).<br />
|
||||||
|
This feature requires PHP >= 4.3.0 and
|
||||||
|
MySQL >= 4.0.0 compiled <tt>--with-openssl</tt>.
|
||||||
|
Please also read <a href="#faqwinssl">this FAQ entry</a>.
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dt><b>$cfg['Servers'][$i]['compress']</b> boolean</dt>
|
||||||
|
<dd>
|
||||||
|
Wheather to use a compressed protocol for the MySQL server connection
|
||||||
|
or not (experimental).<br />
|
||||||
|
This feature requires PHP >= 4.3.0.
|
||||||
|
</dd>
|
||||||
|
|
||||||
<dt>
|
<dt>
|
||||||
<b>$cfg['Servers'][$i]['controluser']</b> string<br />
|
<b>$cfg['Servers'][$i]['controluser']</b> string<br />
|
||||||
<b>$cfg['Servers'][$i]['controlpass']</b> string
|
<b>$cfg['Servers'][$i]['controlpass']</b> string
|
||||||
@@ -1840,9 +1856,9 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>[1.26] I just installed phpMyAdmin in my document root of IIS but
|
<b>[1.26] I just installed phpMyAdmin in my document root of IIS but I get
|
||||||
I get the error "No input file specified" when trying to
|
the error "No input file specified" when trying to run
|
||||||
run phpMyAdmin.</b>
|
phpMyAdmin.</b>
|
||||||
<br />
|
<br />
|
||||||
This is a permission problem. Right-click on the phpmyadmin folder
|
This is a permission problem. Right-click on the phpmyadmin folder
|
||||||
and choose properties. Under the tab Security, click on "Add"
|
and choose properties. Under the tab Security, click on "Add"
|
||||||
@@ -1860,6 +1876,15 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
|
|||||||
in PHP 5.0.0.
|
in PHP 5.0.0.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<a name="faqwinssl"></a>
|
||||||
|
<p>
|
||||||
|
<b>[1.28] On my Windows machine, I have enabled SSL my MySQL server
|
||||||
|
connection, but PHP tells me something about an undefined constant
|
||||||
|
<tt>MYSQL_CLIENT_SSL</tt>.</b>
|
||||||
|
<br />
|
||||||
|
This seems to be a <a href="http://bugs.php.net/21981">PHP bug</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
<a name="faqconfig"></a>
|
<a name="faqconfig"></a>
|
||||||
<h3>[2. Configuration]</h3>
|
<h3>[2. Configuration]</h3>
|
||||||
|
|
||||||
|
@@ -64,6 +64,9 @@ $cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname
|
|||||||
$cfg['Servers'][$i]['port'] = ''; // MySQL port - leave blank for default port
|
$cfg['Servers'][$i]['port'] = ''; // MySQL port - leave blank for default port
|
||||||
$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket
|
$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket
|
||||||
$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
|
$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
|
||||||
|
$cfg['Servers'][$i]['ssl'] = FALSE; // Use SSL for the MySQL connection (MySQL >= 4.0.0)
|
||||||
|
$cfg['Servers'][$i]['compress'] = FALSE; // Use compressed protocol for the MySQL connection
|
||||||
|
// (Both are experimental and require PHP >= 4.3.0)
|
||||||
$cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings
|
$cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings
|
||||||
// (this user must have read-only
|
// (this user must have read-only
|
||||||
$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"
|
$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"
|
||||||
@@ -103,6 +106,8 @@ $cfg['Servers'][$i]['host'] = '';
|
|||||||
$cfg['Servers'][$i]['port'] = '';
|
$cfg['Servers'][$i]['port'] = '';
|
||||||
$cfg['Servers'][$i]['socket'] = '';
|
$cfg['Servers'][$i]['socket'] = '';
|
||||||
$cfg['Servers'][$i]['connect_type'] = 'tcp';
|
$cfg['Servers'][$i]['connect_type'] = 'tcp';
|
||||||
|
$cfg['Servers'][$i]['ssl'] = FALSE;
|
||||||
|
$cfg['Servers'][$i]['compress'] = FALSE;
|
||||||
$cfg['Servers'][$i]['controluser'] = '';
|
$cfg['Servers'][$i]['controluser'] = '';
|
||||||
$cfg['Servers'][$i]['controlpass'] = '';
|
$cfg['Servers'][$i]['controlpass'] = '';
|
||||||
$cfg['Servers'][$i]['auth_type'] = 'config';
|
$cfg['Servers'][$i]['auth_type'] = 'config';
|
||||||
@@ -127,6 +132,8 @@ $cfg['Servers'][$i]['host'] = '';
|
|||||||
$cfg['Servers'][$i]['port'] = '';
|
$cfg['Servers'][$i]['port'] = '';
|
||||||
$cfg['Servers'][$i]['socket'] = '';
|
$cfg['Servers'][$i]['socket'] = '';
|
||||||
$cfg['Servers'][$i]['connect_type'] = 'tcp';
|
$cfg['Servers'][$i]['connect_type'] = 'tcp';
|
||||||
|
$cfg['Servers'][$i]['ssl'] = FALSE;
|
||||||
|
$cfg['Servers'][$i]['compress'] = FALSE;
|
||||||
$cfg['Servers'][$i]['controluser'] = '';
|
$cfg['Servers'][$i]['controluser'] = '';
|
||||||
$cfg['Servers'][$i]['controlpass'] = '';
|
$cfg['Servers'][$i]['controlpass'] = '';
|
||||||
$cfg['Servers'][$i]['auth_type'] = 'config';
|
$cfg['Servers'][$i]['auth_type'] = 'config';
|
||||||
|
@@ -130,7 +130,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
|||||||
* Includes compatibility code for older config.inc.php3 revisions
|
* Includes compatibility code for older config.inc.php3 revisions
|
||||||
* if necessary
|
* if necessary
|
||||||
*/
|
*/
|
||||||
if (!isset($cfg['FileRevision']) || (int) substr($cfg['FileRevision'], 13, 3) < 144) {
|
if (!isset($cfg['FileRevision']) || (int) substr($cfg['FileRevision'], 13, 3) < 153) {
|
||||||
include('./libraries/config_import.lib.php3');
|
include('./libraries/config_import.lib.php3');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -607,6 +607,10 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
|||||||
$server_socket = (empty($cfg['Server']['socket']) || PMA_PHP_INT_VERSION < 30010)
|
$server_socket = (empty($cfg['Server']['socket']) || PMA_PHP_INT_VERSION < 30010)
|
||||||
? ''
|
? ''
|
||||||
: ':' . $cfg['Server']['socket'];
|
: ':' . $cfg['Server']['socket'];
|
||||||
|
if (PMA_PHP_INT_VERSION >= 40300) {
|
||||||
|
$client_flags = ($cfg['Server']['ssl'] ? MYSQL_CLIENT_SSL : 0)
|
||||||
|
& ($cfg['Server']['compress'] ? MYSQL_CLIENT_COMPRESS : 0);
|
||||||
|
}
|
||||||
|
|
||||||
// Gets the authentication library that fits the $cfg['Server'] settings
|
// Gets the authentication library that fits the $cfg['Server'] settings
|
||||||
// and run authentication
|
// and run authentication
|
||||||
@@ -676,11 +680,21 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
|||||||
// must be open after this one so it would be default one for all the
|
// must be open after this one so it would be default one for all the
|
||||||
// scripts)
|
// scripts)
|
||||||
if ($cfg['Server']['controluser'] != '') {
|
if ($cfg['Server']['controluser'] != '') {
|
||||||
|
if (PMA_PHP_INT_VERSION >= 40300) {
|
||||||
|
$dbh = @$connect_func(
|
||||||
|
$cfg['Server']['host'] . $server_port . $server_socket,
|
||||||
|
$cfg['Server']['controluser'],
|
||||||
|
$cfg['Server']['controlpass'],
|
||||||
|
FALSE,
|
||||||
|
$client_flags
|
||||||
|
);
|
||||||
|
} else {
|
||||||
$dbh = @$connect_func(
|
$dbh = @$connect_func(
|
||||||
$cfg['Server']['host'] . $server_port . $server_socket,
|
$cfg['Server']['host'] . $server_port . $server_socket,
|
||||||
$cfg['Server']['controluser'],
|
$cfg['Server']['controluser'],
|
||||||
$cfg['Server']['controlpass']
|
$cfg['Server']['controlpass']
|
||||||
);
|
);
|
||||||
|
}
|
||||||
if ($dbh == FALSE) {
|
if ($dbh == FALSE) {
|
||||||
if (PMA_mysql_error()) {
|
if (PMA_mysql_error()) {
|
||||||
$conn_error = PMA_mysql_error();
|
$conn_error = PMA_mysql_error();
|
||||||
@@ -692,7 +706,9 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
|||||||
$local_query = $connect_func . '('
|
$local_query = $connect_func . '('
|
||||||
. $cfg['Server']['host'] . $server_port . $server_socket . ', '
|
. $cfg['Server']['host'] . $server_port . $server_socket . ', '
|
||||||
. $cfg['Server']['controluser'] . ', '
|
. $cfg['Server']['controluser'] . ', '
|
||||||
. $cfg['Server']['controlpass'] . ')';
|
. $cfg['Server']['controlpass']
|
||||||
|
. (PMA_PHP_INT_VERSION >= 40300 ? ', FALSE, ' . $client_flags : '')
|
||||||
|
. ')';
|
||||||
if (empty($GLOBALS['is_header_sent'])) {
|
if (empty($GLOBALS['is_header_sent'])) {
|
||||||
include('./header.inc.php3');
|
include('./header.inc.php3');
|
||||||
}
|
}
|
||||||
@@ -705,11 +721,22 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
|||||||
// Robbat2 - May 11, 2002
|
// Robbat2 - May 11, 2002
|
||||||
|
|
||||||
// Connects to the server (validates user's login)
|
// Connects to the server (validates user's login)
|
||||||
|
if (PMA_PHP_INT_VERSION >= 40300) {
|
||||||
|
$userlink = @$connect_func(
|
||||||
|
$cfg['Server']['host'] . $server_port . $server_socket,
|
||||||
|
$cfg['Server']['user'],
|
||||||
|
$cfg['Server']['password'],
|
||||||
|
FALSE,
|
||||||
|
$client_flags
|
||||||
|
);
|
||||||
|
} else {
|
||||||
$userlink = @$connect_func(
|
$userlink = @$connect_func(
|
||||||
$cfg['Server']['host'] . $server_port . $server_socket,
|
$cfg['Server']['host'] . $server_port . $server_socket,
|
||||||
$cfg['Server']['user'],
|
$cfg['Server']['user'],
|
||||||
$cfg['Server']['password']
|
$cfg['Server']['password']
|
||||||
);
|
);
|
||||||
|
|
||||||
|
}
|
||||||
if ($userlink == FALSE) {
|
if ($userlink == FALSE) {
|
||||||
PMA_auth_fails();
|
PMA_auth_fails();
|
||||||
} // end if
|
} // end if
|
||||||
|
@@ -62,6 +62,14 @@ if (!defined('PMA_CONFIG_IMPORT_LIB_INCLUDED')) {
|
|||||||
unset($cfg['Servers'][$i]['adv_auth']);
|
unset($cfg['Servers'][$i]['adv_auth']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($cfg['Servers'][$i]['ssl'])) {
|
||||||
|
$cfg['Servers'][$i]['ssl'] = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($cfg['Servers'][$i]['compress'])) {
|
||||||
|
$cfg['Servers'][$i]['compress'] = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($cfg['Servers'][$i]['user'])) {
|
if (!isset($cfg['Servers'][$i]['user'])) {
|
||||||
$cfg['Servers'][$i]['user'] = 'root';
|
$cfg['Servers'][$i]['user'] = 'root';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user