Private GIT

Skip to content
Snippets Groups Projects
Commit 85a87db8 authored by phpipam.net's avatar phpipam.net
Browse files

Added check for SSL MySQL - issue ##207

parent 4d7b887e
No related branches found
No related tags found
No related merge requests found
...@@ -9,13 +9,15 @@ $db['name'] = "phpipam"; ...@@ -9,13 +9,15 @@ $db['name'] = "phpipam";
$db['port'] = 3306; $db['port'] = 3306;
/* SSL options /* SSL options
******************************/ ******************************
// See http://php.net/manual/en/ref.pdo-mysql.php See http://php.net/manual/en/ref.pdo-mysql.php
// https://dev.mysql.com/doc/refman/5.7/en/ssl-options.html https://dev.mysql.com/doc/refman/5.7/en/ssl-options.html
// Please update these settings before setting 'ssl' to true. Please update these settings before setting 'ssl' to true.
// All settings can be commented out or set to NULL if not needed All settings can be commented out or set to NULL if not needed
php 5.3.7 required
*/
$db['ssl'] = false; # true/false, enable or disable SSL as a whole $db['ssl'] = false; # true/false, enable or disable SSL as a whole
$db['ssl_key'] = "/path/to/cert.key"; # path to an SSL key file. Only makes sense combined with ssl_cert $db['ssl_key'] = "/path/to/cert.key"; # path to an SSL key file. Only makes sense combined with ssl_cert
$db['ssl_cert'] = "/path/to/cert.crt"; # path to an SSL certificate file. Only makes sense combined with ssl_key $db['ssl_cert'] = "/path/to/cert.crt"; # path to an SSL certificate file. Only makes sense combined with ssl_key
......
...@@ -45,6 +45,13 @@ if ((@include_once 'PEAR.php') != true) { ...@@ -45,6 +45,13 @@ if ((@include_once 'PEAR.php') != true) {
$missingExt[] = "php PEAR support"; $missingExt[] = "php PEAR support";
} }
# if db ssl = true check version
if (@$db['ssl']==true) {
if (phpversion() < "5.3.7") {
$missingExt[] = "For SSL MySQL php version 5.3.7 is required!";
}
}
# if any extension is missing print error and die! # if any extension is missing print error and die!
if (sizeof($missingExt) != 1) { if (sizeof($missingExt) != 1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment