Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

[SOLVED] Connecting...
 
Notifications
Clear all

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

3 Posts
2 Users
0 Reactions
4,238 Views
jlenuff
(@desperados)
Posts: 16
Active Member
Topic starter
 
[#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

 
Posted : 12 Apr 2016 15H31
jlenuff
(@desperados)
Posts: 16
Active Member
Topic starter
 

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

 
Posted : 12 Apr 2016 15H53
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

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


 
Posted : 14 Apr 2016 22H30
Share:

Scroll to Top