Update Comments
This commit is contained in:
parent
a1c87b45ff
commit
f03e209416
1 changed files with 3 additions and 4 deletions
|
|
@ -5,7 +5,7 @@
|
||||||
// Set time zone and ensure clean error reporting for debugging development builds
|
// Set time zone and ensure clean error reporting for debugging development builds
|
||||||
date_default_timezone_set('UTC');
|
date_default_timezone_set('UTC');
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
ini_set('display_errors', 0); // Keep disabled in production so errors don't corrupt JSON payloads
|
ini_set('display_errors', 0); // Disabled in production builds so errors don't corrupt JSON payloads
|
||||||
|
|
||||||
// ====================================================================
|
// ====================================================================
|
||||||
// 2. DATABASE CONFIGURATION (Aiven Cloud Connection Matrix)
|
// 2. DATABASE CONFIGURATION (Aiven Cloud Connection Matrix)
|
||||||
|
|
@ -18,7 +18,7 @@ $db_pass = getenv('DB_PASS') ?: '';
|
||||||
$db_name = 'defaultdb';
|
$db_name = 'defaultdb';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Open a secure database link using the fast, modern PHP Data Objects (PDO) framework
|
// Open a secure database link using the PHP Data Objects (PDO) framework
|
||||||
$pdo = new PDO(
|
$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_user,
|
||||||
|
|
@ -32,7 +32,6 @@ try {
|
||||||
);
|
);
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
// If the database connection drops, immediately return a clean JSON error response
|
// 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.
|
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
http_response_code(500);
|
http_response_code(500);
|
||||||
echo json_encode([
|
echo json_encode([
|
||||||
|
|
@ -45,7 +44,7 @@ try {
|
||||||
// ====================================================================
|
// ====================================================================
|
||||||
// 3. MEDIA UPLOAD & STORAGE CONFIGURATION (Cloudinary)
|
// 3. MEDIA UPLOAD & STORAGE CONFIGURATION (Cloudinary)
|
||||||
// ====================================================================
|
// ====================================================================
|
||||||
// Pull your raw cloudinary:// URL string directly from Vercel's Environment Variables
|
// Pull raw cloudinary:// URL string directly from Vercel's Environment Variables
|
||||||
$cloudinary_env = getenv('CLOUDINARY_URL') ?: 'cloudinary://LOCAL_MOCK_KEY_FOR_TESTING';
|
$cloudinary_env = getenv('CLOUDINARY_URL') ?: 'cloudinary://LOCAL_MOCK_KEY_FOR_TESTING';
|
||||||
|
|
||||||
// Define it as a global constant so your existing media/upload scripts run unchanged
|
// Define it as a global constant so your existing media/upload scripts run unchanged
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue