Reputation: 39
I wrote and executed PHP
code in the Terminal of Ubuntu.
In this case I got some errors. When I am using the Terminal it shows the error instantaneously. When the same code is run in a browser it doesn't show any error. Why does this happen, and how do I show the error in my browser?
Upvotes: 0
Views: 1207
Reputation: 10099
Change error_reporting
to E_ALL
and display_errors = 1
in /etc/php5/cli/php.ini
or /etc/php/fpm/php.ini
and restart the web service.
Upvotes: 1
Reputation: 3871
command line php and regular, web php (such as apache's) have different php.ini files with different configurations
What you should do is to compare the two ini files and find what you need to correct.
Find error_reporting
and display_errors
directives.
Upvotes: 3