Hello everyone I am really new to ubuntu? I just brought a new ubuntu 14 machine. I successfully installed apache2 and php5 but unable to see any warnings or error messages on the browser even though i am generating the errors to see them.
Every thing was working good on my old windows machine with XAMPP.
Now I have set the following values into
/etc/php5/apache2/php.ini and /etc/php5/cli/php.ini
error_reporting = E_ALL | E_STRICT
display_errors = On
display_startup_errors = On
It does not show any errors until I use the following ini_set on each page
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
P.S. - I have also used echo php_ini_loaded_file();
which shows
/etc/php5/apache2/php.ini
Please help me :'(
Check for the "loaded configuration file" in php.ini. If it is the same file then there must be some duplicate "display_errors = Off" line in your php.ini file in your bottom part. The later lines are always taken for execution. So search for all "display_errors" in your php.ini file and remove duplicates. And restart apache. Check phpinfo() output again to find about the "error reporting" variables.
Here are the steps if you're dealing with PHP 7.4. You should be able to swap out the version number you're dealing with. Step 4 is probably the one you're missing.
php_ini_loaded_file();
in it./etc/php/7.4/fpm/php.ini
display_errors
. Change the value to On
sudo service php7.4-fpm restart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With