mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-05 09:11:29 +02:00
Added PgSQL support in all automation scripts
This commit is contained in:
parent
2ebeed2500
commit
ba05bd618c
7 changed files with 93 additions and 47 deletions
|
@ -1,10 +1,17 @@
|
|||
<?php
|
||||
|
||||
// Connect to the MySQL database using PDO
|
||||
$c = require 'config.php';
|
||||
$dsn = "mysql:host={$c['mysql_host']};dbname={$c['mysql_database']};port={$c['mysql_port']}";
|
||||
$dbh = new PDO($dsn, $c['mysql_username'], $c['mysql_password']);
|
||||
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$c = require_once 'config.php';
|
||||
require_once 'helpers.php';
|
||||
|
||||
// Connect to the database
|
||||
$dsn = "{$c['db_type']}:host={$c['db_host']};dbname={$c['db_database']};port={$c['db_port']}";
|
||||
|
||||
try {
|
||||
$dbh = new PDO($dsn, $c['db_username'], $c['db_password']);
|
||||
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
} catch (PDOException $e) {
|
||||
die("Connection failed: " . $e->getMessage());
|
||||
}
|
||||
|
||||
// Auto-Renew Grace Period
|
||||
$auto_renew = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue