nano-pro/config.example.php
DJP f7ea6006db Fix config to always define SSO constants
Updated config.example.php to match working config structure:

Changes:
- Load env_loader.php with file_exists check
- Always define SSO_ENABLED, SSO_TENANT_ID, SSO_CLIENT_ID
- Use !defined() checks to prevent redefinition errors
- Defaults to false/empty if .env not found
- Added error reporting settings

Server-check.php improvements:
- Shows actual SSO constant values (TRUE/FALSE/EMPTY)
- Better diagnostic output

DEPLOYMENT FIX:
On server, update config.php to match config.example.php structure.
This ensures SSO constants are always defined.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2025-12-16 11:23:47 -05:00

36 lines
1.1 KiB
PHP

<?php
/**
* Configuration file for Nano Banana Pro Image Generator
*
* IMPORTANT: Copy this file to config.php and add your Google Gemini API key
*/
// Load environment variables from .env file
if (file_exists(__DIR__ . '/env_loader.php')) {
require_once __DIR__ . '/env_loader.php';
}
// Google Gemini API Key (Nano Banana Pro)
// Get your API key from: https://aistudio.google.com/app/apikey
define('GEMINI_API_KEY', 'YOUR_API_KEY_HERE');
// MSAL / Azure AD SSO Configuration
// Always define these constants with defaults if not set
if (!defined('SSO_ENABLED')) {
define('SSO_ENABLED', getenv('SSO_ENABLED') === 'true');
}
if (!defined('SSO_TENANT_ID')) {
define('SSO_TENANT_ID', getenv('SSO_TENANT_ID') ?: '');
}
if (!defined('SSO_CLIENT_ID')) {
define('SSO_CLIENT_ID', getenv('SSO_CLIENT_ID') ?: '');
}
// Session configuration
ini_set('session.gc_maxlifetime', 3600); // 1 hour
ini_set('session.cookie_lifetime', 3600);
// Error reporting (set to 0 in production)
error_reporting(E_ALL);
ini_set('display_errors', 1); // Temporarily enabled for debugging
ini_set('log_errors', 1);