Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

nucofig settings for SSL .pem certificate

Questions related to installing, updating, setting up and configuring
Post Reply
MrMatt
Posts: 1
Joined: Fri Jun 17, 2022 9:45 pm
nuBuilder Version: 4.5

nucofig settings for SSL .pem certificate

Unread post by MrMatt »

Hello, new to nubuilder and really hoping to use it to build some applications. I'm stuck on how to include my ssl cert settings.

Normally my MySQL config settings would look like this (connection variables predefined in the config):

$connect = mysqli_init();
mysqli_ssl_set($connect,NULL,NULL, "/etc/ssl/certs/Baltimore_CyberTrust_Root.pem", NULL, NULL);
mysqli_real_connect($connect, $dbhost, $dbusername, $dbpassword, null, 3306, MYSQLI_CLIENT_SSL);

mysqli_select_db($connect,$dbname) or die ("Database connection failed, please cont your server admin.");

Does anyone know how I would apply those settings in the nuconfig.php file?
(Debian 18.04, PHP 7.2x, MySQL 5.6.47.0)

Without it I get: "Connection failed: SQLSTATE[HY000] [9002] SSL connection is required. Please specify SSL options and retry."

Thanks in advance!
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: nucofig settings for SSL .pem certificate

Unread post by kev1n »

Hi,

You can set custom options for the DB connection:

viewtopic.php?t=11532

nuBuilder uses PDO, not mysqli.

This might help:
https://stackoverflow.com/questions/548 ... -client-ce
Post Reply