I'm getting the
Whoops, looks like something went wrong.
on my production server.
All the sudden, no artisan commands are working. I was getting an error on /bootstrap/compiled.php:4496.
After removing compiled.php, I'm getting the same message
"array_merge(): Argument #2 is not an array" in /vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository".php:188.
My services.json files is empty, and when I try to PHP artisan cache:clear, I receive the same error message.
Does anyone know what I can try next? Thanks in advance
It looks like we ran out of space on the server. That's why it couldn't write to the file.
When Laravel is on production without debug option this message is shown "Whoops, looks like something went wrong.", you can edit you .env line
APP_DEBUG=false
to
APP_DEBUG=true
and then you will see error(have more info about error) you will know how to fix.
Removing services.json from bootstrap/cache fixed the issue.
Source: https://laracasts.com/discuss/channels/laravel/update-to-51-and-array-merge-argument-2-is-not-an-array
have you tried to delete your vender + /bootstrap/compiled.php and your service.json and then tried to reinstall laravel again using composer install ?
Related
Need help I am using framework Laravel 5.5 and everyday pretty often showing up this kind of error.
This error showing up usually on different pages l cannot understand what is wrong and whats is it could be maybe I should renew Laravel? Maybe it's going to solve a problem? I cleaned cache tried a lot of type of anything rules file storage/framework/views everything correct. Could anyone please help me who has the same problem or any type of situation?
Frame.php line 123at HandleExceptions->handleError(2, 'file_get_contents(/var/www/vhosts/*******/httpdocs/storage/framework/views/778d093ecf03c1c355a2d49e5e2d077704cd29d1.php): failed to open stream: No such file or directory', '/var/www/vhosts//*******//httpdocs/vendor/filp/whoops/src/Whoops/Exception/Frame.php', 123, array('filePath' => '/var/www/vhosts/r/*******//httpdocs/storage/framework/views/778d093ecf03c1c355a2d49e5e2d077704cd29d1.php'))at file_get_contents('/var/www/vhosts//*******//httpdocs/storage/framework/views/778d093ecf03c1c355a2d49e5e2d077704cd29d1.php')in Frame.php line 123at Frame->getFileContents()in Frame.php line 203at Frame->getFileLines(173, 40)in frame_code.html.php line 24at require('/var/www/vhosts/r/*******//httpdocs/vendor/filp/whoops/src/Whoops/Resources/views/frame_code.html.php')in TemplateHelper.php line 250at TemplateHelper->Whoops\Util\{closure}('/var/www/vhosts/r/*******//httpdocs/vendor/filp/whoops/src/Whoops/Handler/../Resources/views/frame_code.html.php ……
To me this looks like a view cache error. Try to run
php artisan view:clear
php artisan view:cache
The code does not have permission to create and edit files.
You need to go to the httpdocs directory and run the sudo chmod 777 -R storage/ command there
I am using php 7.3.2 on window 7. When I try to run php artisan serve, it shows this error on the webpage:
Whoops, looks like something went wrong.
Is it related to the message that I received when I want to migrate database, it says
Application In Production!
My error in laravel log shows
production.ERROR: RuntimeException: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. in C:\xampp\htdocs\Inventory\vendor\laravel\framework\src\Illuminate\Encryption\Encrypter.php:43
Following the error in your log file you seem to be missing your key attribute in your .env file. See this SO question for a solution.
To generate the secret key, run
$ php artisan key:generate
make sure to follow the official docs when installing Laravel.
Your laravel is running in production mode. If you are developing local, you should switch that for your local maschine.
To do so: In your .env set the APP_ENV to local (APP_ENV=local) and try again.
Now, you will see the full error message and you are able to handle it now.
recently install mautic 2.8.1, after setup api ,authorized it in auth2, after so many try it only gives output:
Looks like I encountered an error (error #404). If I do it again,
please report me to the system administrator!
Do you have any idea, about this how to resolve this issue.
Clearing Mautic's cache usually solves this. Run rm -rf app/cache/prod/* in the Mautic root directory.
Another issue may be wrong URL. Double check it doesn't have two slashes or something like it. I also saw that someone tried to access https://some.mautic/api That endpoint does not exist. But https://some.mautic/api/contacts does.
Update: Since Mautic 3 the cache directory was moved to bin/cache.
I have APP_DEBUG=true in the .env file:
APP_ENV=local
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://test.dev
I've deliberately use incorrect incorrect url (eg: test.dev/asdsadsa) which does not in the web.php route file.
I expected to get an laravel debug error when route does not exist
Sorry, the page you are looking for could not be found.
NotFoundHttpException in RouteCollection.php line 161:
However, it keep showing 404 error page (views/errors/404.blade.php) even APP_DEBUG is set to true.
What I have tried:
1 - I even tested to make sure laravel can read .env file:
Route::get('/', function() {
dd(env('APP_DEBUG'));
});
return true
2 - php artisan config:cache did not fix it.
3 - chmod -R 777 storage did not fix it.
if you have 404 error page in views/errors it will be displayed, and if you haven't, NotFoundHttpException will be displayed.
I'm very late to the game here, but if nothing else worked try clearing all cache and then run:
php artisan optimize:clear
Just add this two lines in your error view, for example in views\errors\404.blade.php
<?php $e = new Symfony\Component\Debug\ExceptionHandler(); ?>
<?php echo getenv('APP_DEBUG') == 'true' ? $e->getContent(Symfony\Component\Debug\Exception\FlattenException::create($exception)) : ''; ?>
This will show the laravel debug error in your custom 404 error page.
Remove make sure that Your App\Exceptions\Handler does not have in $dontReport this line:
'Symfony\Component\HttpKernel\Exception\HttpException'
take a look at documentation: https://laravel.com/docs/5.3/errors#the-exception-handler
and find:
Ignoring Exceptions By Type
The $dontReport property of the exception handler contains an array of
exception types that will not be logged. For example, exceptions
resulting from 404 errors, as well as several other types of errors,
are not written to your log files. You may add other exception types
to this array as needed
Make sure you have .env file in the root folder of the laravel project. If you don't have one, please search how to create laravel .env file and create it.
I have Laravel 5.0.34 project that works perfectly fine, but recently I had to install another plugin and realized that as soon as I try to run
composer update
in my root directory, it gives the error
Script php artisan optimize handling the post-update-cmd event returned with an error
I have tried removing the post-update-cmd section of my composer.json, but all that does is removes the error from popping up on the command-line. It still gives an error when I try to display the project though.
I have also tried deleting storage/framework/compiled, but found that I don't have that file/directory
This person seemed to have the same issue, but none of their fixes worked for me
http://laravel.io/forum/03-25-2015-composer-update-throwing-error-script-php-artisan-optimize-handling-the-post-update-cmd-event-returned-with-an-error
Any help would be greatly appreciated!