Forum

[SOLVED] Connecting...
 
Notifications
Retirer tout

[SOLVED] Connecting ProjeQtOr to a remote MySql server over SSL

3 Posts
2 Utilisateurs
0 Reactions
4,212 Vu
jlenuff
(@desperados)
Posts: 16
Active Member
Début du sujet
 
[#3271]

Hi Everyone !

I just have installed my ProjeQtOr on my web server.

I'm on the configuration page.

Here are the results of the configuration checks :

PHP version is 7.0.5 : OK
Module PDO is available : OK
Module PDO for 'MYSQL' is available : OK
Module MBSTRING is available : OK
GD Library is available and correctly installed : OK
Module IMAP is available : OK
Module OPENSSL is available : OK
Module XML is available : OK
max_input_vars=4000 : OK
max_execution_time=30 : OK
memory_limit=512M : OK
file_uploads=1 : OK
session.auto_start is disabled : OK
magic_quotes_gpc is disabled : OK
register_globals is disabled : OK

So, all is OK.

On the other hand, my MySql server refuse all no-SLL connection. So, my ProjeQtOr can't connect to my database.

How can I configure the PDO::MYSQL_ATTR_SSL_KEY, PDO::MYSQL_ATTR_SSL_CERT and PDO::MYSQL_ATTR_SSL_CA database parameters on ProjeQtOr ?


Jordan LE NUFF
IT Project Manager

 
Posté : 12 Avr PM 15:044
jlenuff
(@desperados)
Posts: 16
Active Member
Début du sujet
 

Re all,

I've found a way to connect to my MySql server.

In the "tool/configCheck.php" file, i added theses lines at line 87 and 106 :

    $connexion = new PDO($dsn, $param['DbUser'], $param['DbPassword'],
array(
            PDO::MYSQL_ATTR_SSL_KEY    =>'/etc/pki/tls/private/my-key.pem',
            PDO::MYSQL_ATTR_SSL_CERT=>'/etc/pki/tls/certs/my-cert.pem',
            PDO::MYSQL_ATTR_SSL_CA    =>'/etc/pki/CA/certs/my-ca-cert.pem'
        ));

I also added these lines in the "model/persistence/Sql.php" file at line 280 :

        self::$connexion = new PDO($dsn, self::$dbUser, self::$dbPassword,
array(
            PDO::MYSQL_ATTR_SSL_KEY    =>'/etc/pki/tls/private/my-key.pem',
            PDO::MYSQL_ATTR_SSL_CERT=>'/etc/pki/tls/certs/my-cert.pem',
            PDO::MYSQL_ATTR_SSL_CA    =>'/etc/pki/CA/certs/my-ca-cert.pem'
        ));

Jordan LE NUFF
IT Project Manager

 
Posté : 12 Avr PM 15:044
(@babynus)
Posts: 14952
Membre Admin
 

Thanks for sharing the solution.
Will possibly include it in community version (Ticket #2046)


 
Posté : 14 Avr PM 22:044
Share:
Retour en haut