Reputation: 1827
When I run some php code with a syntax error, it does not show any warning or fatal error. Instead, it shows the message below
Server error The website encountered an error while retrieving http://190.168.191.32/administrator/reports.php. It may be down for maintenance or configured incorrectly. Here are some suggestions: Reload this web page later.
What is the reason and how do I solve this problem?
Upvotes: 0
Views: 320
Reputation: 1964
The error you are describing is a 500 Error.
PHP is setup to throw this when the error reporting is not public(production env).
If you want to see them from the browser you'll have to set
display_errors = On in you php.ini
Upvotes: 1
Reputation: 40750
check your php.ini file. Especially check the options display_errors and error_reporting
Or/And read the log file of your Webserver. On a typcial setup with apache on linux this is /var/log/apache/error.log
Upvotes: 0
Reputation: 3171
In debug environments, use error_reporting(E_ALL | E_STRICT)
so that php reports all errors.
Upvotes: 1