Добрый вечер, у меня проблема с запуском одного проекта.. Вот скрин ошибки http://prntscr.com/8z3pev Вот код ошибки: PHP: <?php$ACCESS_LEVEL = ACCESS_LEVEL_GUEST;require_once(DOC_ROOT.'/includes/authorization.php');$index_ctrl = new IndexController();$index_ctrl->run(); и вот код страницы includes/authorization.php PHP: <?phpif ($GLOBALS['ACCESS_LEVEL'] > ACCESS_LEVEL_GUEST && App::get()->isGuest) { location('/index.php?action=login');}//include_once LIB_ROOT.'/auth_controller.php';//Project::getInstance()->resetCurUser(intval($_SESSION['CUR_USER']['id']));//Project::getInstance()->logPost();//App::get()->smarty->assign('authorized', 0);//if (AuthController::getInstance()->isAuthorized()) {// //if got logout action// if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'logout') {// session_destroy();// header('Location: /index.php');// }// //if got pin action// if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'pin') {// $last_visit = sql_row('SELECT INET_NTOA(ip) as ip, stamp, user_id FROM visits WHERE user_id="'.Project::getInstance()->getCurUser()->id.'" ORDER BY stamp DESC LIMIT 1');// if ($_REQUEST['pin'] == get_auth_pin($last_visit['stamp'])) {// include_once(LIB_ROOT.'/users/ip_controller.class.php');// $ip_ctrl = new IpController(Project::getInstance()->getCurUser()->id);// $ip_ctrl->saveIp();// }// }// if (Project::getInstance()->getCurUser()->isAdmin()) {// $last_visit = sql_row('SELECT INET_NTOA(ip) as ip, stamp, user_id FROM visits WHERE user_id="'.Project::getInstance()->getCurUser()->id.'" ORDER BY stamp DESC LIMIT 1');// if ($last_visit['ip'] != $_SERVER['REMOTE_ADDR']) {// mail(get_setting('project_email'), 'Auth PIN', get_auth_pin($last_visit['stamp']));// App::get()->showPage('pin_warning.tpl');// exit;// }// }// if (Project::getInstance()->getCurUser()->access < $GLOBALS['ACCESS_LEVEL']) {// App::get()->showPage('login_warning.tpl');// exit();// }// App::get()->smarty->assign('authorized', 1);//}//else {// //if got login action// if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'login') {// AuthController::getInstance()->authorize($_REQUEST['login'], $_REQUEST['password'], $_REQUEST['secpin']);// if (AuthController::getInstance()->isAuthorized()) {// if (Project::getInstance()->getCurUser()->access_notify) {// include_once(LIB_ROOT.'/emails.class.php');// //%user_fullname%, %user_login%, %access_time%, %access_ip%, %project_name%, %project_email// $params = array(// '%user_fullname%' => Project::getInstance()->getCurUser()->fullname,// '%user_login%' => Project::getInstance()->getCurUser()->login,// '%user_password%' => Project::getInstance()->getCurUser()->password,// '%project_name%' => get_setting('project_name'),// '%project_email%' => get_setting('project_email'),// '%access_time%' => date('d.m.Y H:i', Project::getInstance()->getNow()),// '%access_ip%' => $_SERVER['REMOTE_ADDR']// );// $email = new Emails(Project::getInstance()->getCurUser()->id, 'access_notify', $params);// $email->send();// }// if (Project::getInstance()->getCurUser()->isAdmin()) {// $last_visit = sql_row('SELECT INET_NTOA(ip) as ip, stamp, user_id FROM visits WHERE user_id="'.Project::getInstance()->getCurUser()->id.'" ORDER BY stamp DESC LIMIT 1');// if ($last_visit != $_SERVER['REMOTE_ADDR']) {// mail(get_setting('project_email'), 'Auth PIN', get_auth_pin($last_visit['stamp']));// App::get()->showPage('pin_warning.tpl');// exit;// }// }// include_once(LIB_ROOT.'/users/ip_controller.class.php');// $ip_ctrl = new IpController(Project::getInstance()->getCurUser()->id);// $ip_ctrl->saveIp();// location('/user/account.php');// }// else {// location('/user/account.php', '<p class="imp"><strong>Alert:</strong> Authorization failed!</p>');// exit;// }// }// //if got pin action// elseif (isset($_REQUEST['action']) && $_REQUEST['action'] == 'pin') {// $last_visit = sql_row('SELECT INET_NTOA(ip) as ip, stamp, user_id FROM visits WHERE user_id="'.Project::getInstance()->getCurUser()->id.'" ORDER BY stamp DESC LIMIT 1');// if ($_REQUEST['pin'] == get_auth_pin($last_visit['stamp'])) {// include_once(LIB_ROOT.'/users/ip_controller.class.php');// $ip_ctrl = new IpController(Project::getInstance()->getCurUser()->id);// $ip_ctrl->saveIp();// location('/user/account.php');// }// }// else {// //if guest & ACCESS_LEVEL > guest// if ($GLOBALS['ACCESS_LEVEL'] > ACCESS_LEVEL_GUEST) {// App::get()->showPage('login_warning.tpl');// exit;// }// }//}//Project::getInstance()->processEarnings();////function get_auth_pin($stamp) {// if (empty ($stamp)) {// return '';// }// return substr($stamp, 0, 3) . '-' . substr($stamp, 6, 3);//} Вот кусочек кода из файла конфигурации PHP: <?phpif (php_sapi_name() == 'cli') $_SERVER['REMOTE_ADDR'] = '127.0.0.1';/** PATHS **//*** Путь к public_html проекта* Здесь будет конфиг, скин и временные директории*/DEFINE('BASE_ROOT', dirname('/home/valerius/valeriussoft.info/hyip1'));/*** Путь к скрипту* Он у нас в другом месте*/DEFINE('DOC_ROOT', '/home/valerius/valeriussoft.info/hyip1');DEFINE('LIB_ROOT', DOC_ROOT . '/includes/library');/** ERROR REPORTING **/error_reporting(E_ALL);require_once(DOC_ROOT . '/library/functions/functions.php');require_once(DOC_ROOT . '/library/functions/mysql.php');set_error_handler('errorHandler');
Не уверен, что DOCUMENT_ROOT определён, у вас в конфиге написано DOC_ROOT, а подставляет он DOCUMENT_ROOT.
Да.. нее . я тестировал и так и как надо .. но не получилось .. Если поможете с этим скриптом ...я добавлю на сайт + 30 Прикольных сомописных скриптов Просто очень нужен этот скрипт.. но он даёт ошибку вот сам скрипт СКАЧАТЬ
проверьте .htaccess, там есть такая строка: Код: php_valueauto_prepend_file c:/wamp/www/total-invest/ai-config.php На хостинге она должна соответствовать пути к проекту. дальше у меня начала валиться ошибка с mysql_query, т.к. у меня стоит пхп5.6 я не стал дальше разбираться.