<?php
/**
 * Ahead WebSoft Technologies Pvt Ltd.
 * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
 * @license    https://www.socialengine.com/policies
 */

// Check version
if (version_compare(phpversion(), '8.2', '<')) { 
    printf('PHP 8.2 is required, you have %s', phpversion());
    exit(1);
}
// check file exists
if(file_exists(dirname(__FILE__) . '/debug.php') == false ) {
    file_put_contents('debug.php', "<?php\n\ndefine('_ENGINE_ENABLE_DEBUG_MODE', false);\n");
    chmod('debug.php', 0644);
}
include_once dirname(__FILE__) . '/debug.php';

// enable development log
defined('_ENGINE_ENABLE_LOG') || define('_ENGINE_ENABLE_LOG', false);

// Constants
define('_ENGINE_R_BASE', dirname($_SERVER['SCRIPT_NAME']));
define('_ENGINE_R_FILE', $_SERVER['SCRIPT_NAME']);

include dirname(__FILE__)
    . DIRECTORY_SEPARATOR.
    'boot.php';

$boot = new Engine_Boot(dirname(__FILE__));
$boot->boot();
