anlutro / laravel-4-smart-errors

Smarter error handling for Laravel 4
65 stars 13 forks source link

Error inside the error handler. #33

Closed dsujoy closed 8 years ago

dsujoy commented 8 years ago

I installed the package several times in diferent project (laravel 4.2) in the lastone was working perfectly, but recently stop working, I think that maybe after a composer update.

I generate an error in the routes files for debug purpouse. (sorry for my english)

I have in the screen the return of the handleHandlerException function: "Error in exception handler. Check system logs error" and in the error_log

[2016-07-11 06:24:29] production.ERROR: Uncaught exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'syntax error, unexpected 'Route' (T_STRING)' in /media/Data/cnce/app/routes.php:38 Stack trace:

0 [internal function]: Illuminate\Exception\Handler->handleShutdown()

1 {main} {"context":"web","environment":"production","hostname":"rebduvid-N56VB","url":"http://localhost.cnce.com","http_method":"GET","referer":"None","client_ip":"127.0.0.1","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0","session_id":"45142c3b8edf08eb5d49b5d690bbee560a94409c","session":{"_token":"LMBH3nLu03mrSmanV4QONS7fbw3MRmk3NhblWhWp","flash":{"old":[],"new":[]}}} []

But doesn't show the templated error screen.

With the not found exception I don't have problems. The system redirect to the template that I made. But with the fatal errors also must redirect to the error template and doesn't.

Any idea?

Best Regards,

anlutro commented 8 years ago

That's not your system error log, that's your application log. You have to look in your apache error log if you're using mod_php, /var/log/php* if you're using php-fpm, or whatever you've set error_log to in your php.ini.

dsujoy commented 8 years ago

Thank you very much!!!

The error was a wrong configuration of my app in the file mail.php in my local server (maybe i changed).

[Tue Jul 12 00:42:52.408051 2016] [:error] [pid 2251] [client 127.0.0.1:59789] Error in exception handler - https://github.com/anlutro/laravel-4-smart-errors/issues [Tue Jul 12 00:42:52.408309 2016] [:error] [pid 2251] [client 127.0.0.1:59789] exception 'Swift_TransportException' with message 'Cannot send message without a sender address' in /media/Data/aaaaaa/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:162

And in the production server, the problem was another, but similar, also in the mail!!! The production server has a proxy o has disabled the openssl extension, so cannot connect to the smtp server.

[12-Jul-2016 20:29:56 UTC] exception 'Swift_TransportException' with message 'Connection could not be established with host smtp.gmail.com [Connection timed out #110]' in /home/aaaa/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:269

Best regards, I hope this issue being helpfull for another users.