I'm new to PHP and the whole LAMP stack but I've managed to get it up and running on my Ubuntu 10.10 system. Everything seems to be working with the exception of error reposting in the browser which I just can't seem to get working (and which I can't work without!).
I've read a number of article and other threads which indicate that the following values should be applied in the file /etc/php5/apache2/php.ini
:
display_errors = On
display_startup_errors = On
I've restarted apache2 and even restarted my computer but for the life of me I just can't get it working. I've even tried using phpinfo()
function which reports that these settings are as I've set them so I know it's picking up the correct configuration file but nothing!
Any help would be welcome.
After you edit /etc/php5/apache2/php.ini be sure to restart apache.
You can do so by running:
I had the same problem - solved it by setting
display_errors = On
in bothphp.ini
files.Then restarting Apache:
Hope this helps.
I was just stuck on the same issue, when I've realized that I was using the open short tag form:
You have to go to your
/etc/apache2/php.ini
file and set theshort_open_tag = Off
toOn
, thensudo service apache2 restart
!Cheers!
Follow the below steps,
Don't just enable the first occurrence of
display_errors
in the php.ini file. Make sure you scroll down to the "real" setting and change it fromOff
toOn
.The thing is that if you settle with changing (i.e. uncomment + add
= On
) by the very first occurrence ofdisplay_errors
your changes will be overwritten somewhere on line 480 where it's set toOff
again.To make it work you should change the following variables in your php.ini:
Search for them as they are already defined and put your desired value. Then restart your apache2 server and everything will work fine. Good luck!