Well to be honest, being an experienced developper I don't think it possible (it would have been different if another language than PHP was involved), but being a beginner with laravel (but not with PHP) I'm at my wits end.
So after an installation of Laravel 5.4, and added several routes and blades, migrated, customized the App\Exceptions\Handler class (in order to send an mail at each exception), I stumbled on this peculiar thing: whenever I use a certain string in a blade I get exceptions in the logs. The moment I remove the string, the problem disappear.
Here is the string:
<script src="js/hghhgueryjs">
Please note that spaces are significant, the gibberish hghhg is not but something has to be there.
There can be either a lot of text of only this line it will failed, but if this line is not there all is good.
I really can't make any sens out of this, and as a beginner I can't think of another action except read the source of laravel but it would be a overwhelming task.
I didn't take the time to test on a fresh installation (as I generally do), because it would imply a bug in Laravel. Clearly I did something I shouldn't.
Has someone an idea ?
P.S. :
- Laravel 5.4
- php-fpm 7.0
- nginx 1.10.3
- debian current stable
- MariaDB 10.1.23
- php modules: bcmath, cache, cli, common, curl, fpm, fxsl, gd, http, igbinary, intl, json, mbstring, mcrypt, memcached, msgpack, net, pear, soap, xml, yac, yaml, zip, mysql
- env file :
APP_ENV=local
APP_DEBUG=true
APP_LOG_LEVEL=debug
- composer.json:
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.4.",
"laravel/tinker": "~1.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.",
"phpunit/phpunit": "~5.7"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\": "app/"
}
}
Here are the exceptions I receive as a mail (3 separate mails):
(1/1) FatalThrowableError
Call to a member function send() on array
in index.php (line 56)
(1/1) FatalErrorException
Uncaught Error: Call to a member function send() on array in /var/www/html/laravel/blog/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:112
Stack trace:
#0 /var/www/html/laravel/blog/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(89): Illuminate\Foundation\Bootstrap\HandleExceptions->renderHttpResponse(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#1 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#2 {main}
thrown
in HandleExceptions.php (line 112)
(1/1) NotFoundHttpException
in RouteCollection.php (line 179)
with a stack provided
I get the following in the laravel.log
[2017-07-29 20:45:37] local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function send() on array in /var/www/html/laravel/blog/public/index.php:56
Stack trace:
#0 {main}
[2017-07-29 20:45:37] local.ERROR: Symfony\Component\Debug\Exception\FatalErrorException: Uncaught Error: Call to a member function send() on array in /var/www/html/laravel/blog/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:112
Stack trace:
#0 /var/www/html/laravel/blog/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(89): Illuminate\Foundation\Bootstrap\HandleExceptions->renderHttpResponse(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#1 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#2 {main}
thrown in /var/www/html/laravel/blog/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:112
Stack trace:
#0 {main}