uhh
This commit is contained in:
parent
b5e96c2a21
commit
a4ddbeb04a
1 changed files with 11 additions and 10 deletions
|
|
@ -20,15 +20,16 @@ $db_name = 'defaultdb';
|
|||
try {
|
||||
// Open a secure database link using the fast, modern PHP Data Objects (PDO) framework
|
||||
$pdo = new PDO(
|
||||
"mysql:host="$db_host;port=$db_port;dbname=$db_name;charset=utf8mb4",
|
||||
"mysql:host=$db_host;port=$db_port;dbname=$db_name;charset=utf8mb4",
|
||||
$db_user,
|
||||
$db_pass,
|
||||
[
|
||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||
PDO::ATTR_EMULATE_PREPARES => false,
|
||||
PDO::MYSQL_ATTR_SSL_CA => true, // Required for Aiven Cloud Database
|
||||
]
|
||||
);
|
||||
);
|
||||
} catch (PDOException $e) {
|
||||
// If the database connection drops, immediately return a clean JSON error response
|
||||
// so the patched Instagram 6.20.2 client app doesn't crash or hang.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue