Whenever my code has an error.. All I get on the browser is a blank white page. No errors. Nothing.
I have tried turning debug
to true
in config/app.php. I have tried running php artisan optimize
. No difference. I have tried this post and this is the resulting error in my command line;
The following exception is caused by a lack of memory and not having swap configured
Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details
PHP Fatal error: Uncaught exception 'ErrorException' with message 'proc_open(): fork failed - Cannot allocate memory' in phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:974
Stack trace:
#0 [internal function]: Composer\Util\ErrorHandler::handle(2, 'proc_open(): fo...', 'phar:///usr/loc...', 974, Array)
#1 phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php(974): proc_open('stty -a | grep ...', Array, NULL, NULL, NULL, Array)
#2 phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php(784): Symfony\Component\Console\Application->getSttyColumns()
#3 phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php(745): Symfony\Component\Console\Application->getTerminalDimensions()
#4 phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php(675): Symfony\Component\Console\Application->getTerminalWidth()
#5 phar:///usr/local/bin/com in phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php on line 974
So here is another problem to deal with... and I still don't have errors showing. I just want to show some meaningful errors... what else can I try?
* UPDATE *
I followed this guide as suggested in the error message above. I got a pretty positive looking response;
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 1.6144 s, 665 MB/s
So I tried running composer update
again. I got this response;
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing laravel/framework (v5.0.5)
- Installing laravel/framework (v5.0.6)
Downloading: 100%
- Installing filp/whoops (1.1.3)
Loading from cache
Writing lock file
Generating autoload files
Generating optimized class loader
Compiling common classes
Compiling views
All good, right? But then, I still get a blank white page when loading my script with an error. Why??
3. 2. From what I can tell, Laravel sending back a 422 means that the request didn't fulfill validation requirements.
By default, the Laravel exception handler will convert exceptions into an HTTP response for you. However, you are free to register a custom rendering closure for exceptions of a given type. You may accomplish this via the renderable method of your exception handler.
How to catch and render custom exception view/message in laravel? Let say that you want to create a custom response or view for your custom error you can do that in laravel. All you need to do is to modify App\Exceptions\Handler class.
first try this command
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1
sudo composer update
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With