Are you using L4 or L5?, if using L5, check your bootstrap/environment.php file.
PHP Catchable fatal error
I'm receiving this error when I'm trying to move my Laravel project to another server. Any ideas?
--
[RuntimeException]
Error Output: PHP Catchable fatal error: Argument 1 passed to Illuminate\
Foundation\Application::detectEnvironment() must be an instance of Closure
, array given, called in /Users/mvanemmerik/song-list/bootstrap/environmen
t.php on line 18 and defined in /Users/mvanemmerik/song-list/vendor/larave
l/framework/src/Illuminate/Foundation/Application.php on line 290
PHP Stack trace:
PHP 1. {main}() /Users/mvanemmerik/song-list/artisan:0
PHP 2. require_once() /Users/mvanemmerik/song-list/artisan:30
PHP 3. require() /Users/mvanemmerik/song-list/bootstrap/start.php:27
PHP 4. Illuminate\Foundation\Application->detectEnvironment() /Users/mva
nemmerik/song-list/bootstrap/environment.php:18
Thanks.
As of this update there is no environment.php anymore
https://github.com/laravel/laravel/commit/430134864642346498631ad562765d69599d6b39
You will see that the environment.php file has been taken out completely. You need to make sure that your project is current with laravel/laravel on github and after that run a composer update. Environment configuration is now done by defining APP_ENV in your .env file. This is an example of .env file
APP_ENV=local
DB_HOST=localhost
DB_NAME=mydbname
DB_USERNAME=homestead
DB_PASSWORD=secret
Please or to participate in this conversation.