In-browser/in-page errors are by default turned off in php runing on apache. Obviously, you’ll only want to do this during the development phase and not when you go to production.
Here’s how to turn on PHP’s in-page error reporting on Ubuntu when developing locally.
sudo nano /etc/php5/apache2/php.ini
display_errors = Off
Replace the parameter ‘Off’ with ‘On’.
display_errors = On
sudo /etc/init.d/apache2 restart
Create a .htaccess file in your app’s root directory.
Add these three lines
php_value error_reporting -1 php_value display_errors stdout php_flag display_startup_errors on