Артур
просто делает редирект(
Артур
и все(
Артур
а пользователь не выходит с админки((
Shokha
ребят
Shokha
HTTP ERROR 500 при установке yii2 хостинг
Виктор
Смотри логи.
Максим
HTTP ERROR 500 при установке yii2 хостинг
init сделал? коннекты к бд прописал?
Shokha
Смотри логи.
PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /var/www/user3034011/data/www/asultonov1.had.su/basic/web/index.php on line 14
Shokha
<?php ini_set('error_reporting', E_ALL); ini_set('display_errors', 1); ini_set('display_startup_errors', 1); // comment out the following two lines when deployed to production defined('YII_DEBUG') or define('YII_DEBUG', true); defined('YII_ENV') or define('YII_ENV', 'dev'); require DIR . '/../vendor/autoload.php'; // require DIR . '/../vendor/yiisoft/yii2/Yii.php'; $config = require DIR . '/../config/web.php'; (new yii\web\Application($config))->run();
Shokha
init сделал? коннекты к бд прописал?
я писал но не знаю правилно я писал или нет но вроде все правилно писал я
Shokha
config/web.php - а тут что?
<?php $params = require DIR . '/params.php'; $db = require DIR . '/db.php'; $config = [ 'id' => 'basic', 'basePath' => dirname(DIR), 'language' => 'ru', 'bootstrap' => ['log'], 'aliases' => [ '@bower' => '@vendor/bower-asset', '@npm' => '@vendor/npm-asset', ], 'components' => [ 'i18n' => [ 'translations' => [ 'common*' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@app/messages', ], ], ], 'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation 'cookieValidationKey' => 'shokhaa', 'baseUrl' => '', ], 'urlManager' => [ 'class' => 'codemix\localeurls\UrlManager', 'languages' => ['ru', 'en', 'uz'], 'enableDefaultLanguageUrlCode' => true, 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [ 'page/<view:[a-zA-Z0-9-]+>' => 'site/page', '' => 'site/index', // '<action>'=>'site/<action>', // '<action>'=>'main/<action>', // '<action>'=>'article/<action>', ], ], 'cache' => [ 'class' => 'yii\caching\FileCache', ], 'user' => [ 'identityClass' => 'app\models\Users', 'enableAutoLogin' => true, ], 'errorHandler' => [ 'errorAction' => 'site/error', ], 'mailer' => [ 'class' => 'yii\swiftmailer\Mailer', // send all mails to a file by default. You have to set // 'useFileTransport' to false and configure a transport // for the mailer to send real emails. //'useFileTransport' => true, ], 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => ['error', 'warning'], ], ], ], 'db' => $db, ], 'params' => $params, ]; if (YII_ENV_DEV) { // configuration adjustments for 'dev' environment /* $config['bootstrap'][] = 'debug'; $config['modules']['debug'] = [ 'class' => 'yii\debug\Module', // uncomment the following to add your IP if you are not connecting from localhost. //'allowedIPs' => ['127.0.0.1', '::1'], ];*/ $config['bootstrap'][] = 'gii'; $config['modules']['gii'] = [ 'class' => 'yii\gii\Module', // uncomment the following to add your IP if you are not connecting from localhost. //'allowedIPs' => ['127.0.0.1', '::1'], ]; } return $config;
Shokha
уже 3 чиса не могу найти не какой решеня
Shokha
помогите пж
Roman
зачем закомментил require DIR . '/../vendor/yiisoft/yii2/Yii.php'; ?
Максим
помогите пж
а тут $params = require DIR . '/params.php'; $db = require DIR . '/db.php';
Максим
бейсик или advanced?
Максим
та это самая нужная строка в yii2)
Максим
тут подключеня к бд
я понимаю) синтаксических ошибок нет?
Shokha
я понимаю) синтаксических ошибок нет?
<?php return [ 'adminEmail' => 's.cardsolutions@gmail.com', 'supportEmail' => 's.cardsolutions@gmail.com', // автоматическая отправка почты с данного емайл 'secretKeyExpire' => 60 * 60, // время хранения секретного ключа 'emailActivation' => false, // активация по емайл 'loginWithEmail' => true, // авторизация по емайл ];
Roman
коммент сними с require
Дмитрий
Всем привет! есть тут пользователи полнотекстового поиска?
Shokha
какая версия php?
измнеил уже во всех верси через хостинг
Shokha
Максим
измнеил уже во всех верси через хостинг
я спросил какая, а не "изменял ли или нет"))
Shokha
тут вроде 7.2 без apache и nginx
Roman
Shokha
🙄☹️
Максим
🙄☹️
выше советуют раскоментить `// require DIR . '/../vendor/yiisoft/yii2/Yii.php';`
Дмитрий
каждый день пользуюсь гуглом, так ша да
как думаешь они там сфинкс используют или эластик?)
Виктор
Ни то ни другое
Shokha
выше советуют раскоментить `// require DIR . '/../vendor/yiisoft/yii2/Yii.php';`
так тоже не помог $yii = new yii/web/Application($config); $yii->run();
Roman
@Shokhaa ты расскоментил?
Shokha
<?php ini_set('error_reporting', E_ALL); ini_set('display_errors', 1); ini_set('display_startup_errors', 1); // comment out the following two lines when deployed to production defined('YII_DEBUG') or define('YII_DEBUG', true); defined('YII_ENV') or define('YII_ENV', 'dev'); require DIR . '/../vendor/autoload.php'; // require DIR . '/../vendor/yiisoft/yii2/Yii.php'; $config = require DIR . '/../config/web.php'; (new yii\web\Application($config))->run();
Shokha
да так тоже делал брат
Максим
сделай так и не комментируй, это нужная тема
Roman
а YII_DEBUG и YII_ENV наоборот, закомментируй. Ты же на продакш льёшь
Shokha
ок
Shokha
норм хостинг скажите
Shokha
пж
Максим
Shokha
шаред или vps?
ну один такой и один такой денги на че будет хватат такое возму
Vano
AWS отличный
Shokha
вот бля админ че пишет бля бля бля
Максим
Shokha
та CGI даже лучше
а почему тогда не работает не пойму
Anonymous
<?php $params = require DIR . '/params.php'; $db = require DIR . '/db.php'; $config = [ 'id' => 'basic', 'basePath' => dirname(DIR), 'language' => 'ru', 'bootstrap' => ['log'], 'aliases' => [ '@bower' => '@vendor/bower-asset', '@npm' => '@vendor/npm-asset', ], 'components' => [ 'i18n' => [ 'translations' => [ 'common*' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@app/messages', ], ], ], 'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation 'cookieValidationKey' => 'shokhaa', 'baseUrl' => '', ], 'urlManager' => [ 'class' => 'codemix\localeurls\UrlManager', 'languages' => ['ru', 'en', 'uz'], 'enableDefaultLanguageUrlCode' => true, 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [ 'page/<view:[a-zA-Z0-9-]+>' => 'site/page', '' => 'site/index', // '<action>'=>'site/<action>', // '<action>'=>'main/<action>', // '<action>'=>'article/<action>', ], ], 'cache' => [ 'class' => 'yii\caching\FileCache', ], 'user' => [ 'identityClass' => 'app\models\Users', 'enableAutoLogin' => true, ], 'errorHandler' => [ 'errorAction' => 'site/error', ], 'mailer' => [ 'class' => 'yii\swiftmailer\Mailer', // send all mails to a file by default. You have to set // 'useFileTransport' to false and configure a transport // for the mailer to send real emails. //'useFileTransport' => true, ], 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => ['error', 'warning'], ], ], ], 'db' => $db, ], 'params' => $params, ]; if (YII_ENV_DEV) { // configuration adjustments for 'dev' environment /* $config['bootstrap'][] = 'debug'; $config['modules']['debug'] = [ 'class' => 'yii\debug\Module', // uncomment the following to add your IP if you are not connecting from localhost. //'allowedIPs' => ['127.0.0.1', '::1'], ];*/ $config['bootstrap'][] = 'gii'; $config['modules']['gii'] = [ 'class' => 'yii\gii\Module', // uncomment the following to add your IP if you are not connecting from localhost. //'allowedIPs' => ['127.0.0.1', '::1'], ]; } return $config;
Блять
Anonymous
За что
Виктор
FastVPS - 5 лет с ним. Ток сервера в Европе, так что с восточной России пинг будет не очень.
Roman
servers.ru
Anonymous
@kohone географию учить нужно было
Shokha
моя ошибка значит от хостинга да?
Максим
@kohone географию учить нужно было
та я все правильно написал) просто чувак исправил сообщение, и я коммент удалил
Anonymous
Пхп
Anonymous
У тебя там юзается фича из 7.*
Roman
вы ещё ему VDS советуете, ага
Anonymous
Дык 5.3
Максим
вы ещё ему VDS советуете, ага
надеюсь, не в этом чате спрашивать будет)
Anonymous
А (new object)->method(v)
Anonymous
Вроде как 7+
Максим
в WWW домены зайди и покажи какая версия для домена включена?
Anonymous
5.4+
Ну похуц
Anonymous
Там 5.3
Anonymous
А бля