Update: 2026-06-23 17:42:09

This commit is contained in:
Hamza-Ayed
2026-06-23 17:42:09 +03:00
parent 148ca3af1d
commit 52c4f96976
3 changed files with 12 additions and 38 deletions

View File

@@ -57,10 +57,11 @@ if ($vendorPath) require_once $vendorPath;
require_once __DIR__ . '/helpers.php';
// تحديد مسار الـ .env بشكل ديناميكي
$siteUser = get_current_user();
$homeDir = "/home/$siteUser";
if (!is_dir($homeDir)) {
$homeDir = realpath(__DIR__ . '/../../../'); // Fallback
$homeDir = realpath(__DIR__ . '/../../../');
if (!$homeDir || !is_dir($homeDir)) {
// Fallback if realpath fails
$siteUser = get_current_user();
$homeDir = "/home/$siteUser";
}
$envFile = getenv('ENV_FILE_PATH') ?: ($homeDir . '/.env');