M
M
MaxKondratenko2018-05-21 08:54:40
Yii
MaxKondratenko, 2018-05-21 08:54:40

How to get rid of white screen when installing yii2 via composer?

I've been struggling for a couple of hours and I can't figure it out in any way .....
When installing yii2 via composer on beget hosting, a white screen.
If you install from the archive, then everything works fine...
If you enable the display of errors in .htaccess or in web/index.php

error_reporting(-1);
ini_set('display_errors', true);

it does not display anything and just a white screen.
If you create another test.php file and enable error display in it
<? 
error_reporting(-1);
ini_set('display_errors', true);

defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');

require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';

$config = require __DIR__ . '/../config/test.php';

(new yii\web\Application($config))->run();

then the following is displayed:
Warning: require(/home/d/***/config/test.php): failed to open stream: Permission denied in /home/d/***/web/test.php on line 11 Warning: require(/home/d/***/config/test.php): failed to open stream: Permission denied in /home/d/***/web/test.php on line 11 Fatal error: require(): Failed opening required '/home/d/***/web/../config/test.php' (include_path='.:/usr/share/php') in /home/d/***/web/test.php on line 11

I compared the rights to files and directories, the paths with the version installed from the archive, everything matches, there were a couple of mismatches in the rights to the files, corrected, nothing helped ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lander, 2018-05-21
@MaxKondratenko

Compare file and directory permissions

Were the owners compared?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question