1 year ago
#73759
Martyn
Setting up yii2 on a local server I have a blank page with internal 500, why?
I have just installed yii2 on a local Vagrant/Homestead server on my macos Monterey.
Unfortunately on the home page has a 500 internal error and displays a blank page. Yii2 seems to have a problem initiating:
(new yii\web\Application($config))->run();
I have checked the requirements.php and everything passes (php 8.1). I have also added
error_reporting(-1);
ini_set('display_errors', true);
to the index.php but nothing displays.
I also tried with the built-in macos apache server with port 8080 and had the same result.
I have checked the error_log and get this:
PHP Fatal error: Uncaught Error: Class "yii\\web\\HeaderCollection" not found in /Users/username/Sites/site/vendor/yiisoft/yii2/web/Response.php:324
Stack trace:\n#0 /Users/username/Sites/site/vendor/yiisoft/yii2/web/HtmlResponseFormatter.php(37): yii\\web\\Response->getHeaders()
#1 /Users/username/Sites/site/vendor/yiisoft/yii2/web/Response.php(1095): yii\\web\\HtmlResponseFormatter->format(Object(yii\\web\\Response))
#2 /Users/username/Sites/site/vendor/yiisoft/yii2/web/Response.php(339): yii\\web\\Response->prepare()
#3 /Users/username/Sites/site/vendor/yiisoft/yii2/web/ErrorHandler.php(136): yii\\web\\Response->send()
#4 /Users/username/Sites/site/vendor/yiisoft/yii2/base/ErrorHandler.php(288): yii\\web\\ErrorHandler->renderException(Object(yii\\base\\ErrorException))
#5 [internal function]: yii\\base\\ErrorHandler->handleFatalError()
#6 {main}
thrown in /Users/username/Sites/site/vendor/yiisoft/yii2/web/Response.php on line 324
Can anyone help with this yii2 setup?
php
macos
yii2
localserver
0 Answers
Your Answer