You are not logged in.
I have installed Apache server and php in my system. I changed my Document root to "/home/my_username/Documents/http" and I added some virtual hosts.
Everything is working fine. Php scripts are also executing perfectly. But the problem is if any error occurred in php file browser showing blank page for that php file. Browser not showing php errors as in the php 5.x versions. I have googled some information that php error handling is changed. Please help me find the perfect solution so that I can get those errors as in the php 5.x version.
My php version is
PHP 7.1.8 (cli) (built: Aug 1 2017 20:49:37) ( NTS )
Last edited by rinzler (2017-08-14 17:51:33)
Offline
Show us how you have configured the error output in your php.ini file. What else have you tried?
Matt
"It is very difficult to educate the educated."
Offline
I didn't changed the php.ini file because its default settings are enough to show the errors.
However my error configuration is php.ini file is:
display_errors = On
; Default Value: On
; Development Value: On
; Production Value: Off
; display_startup_errors
; Default Value: Off
; Development Value: On
; Production Value: Off
error_reporting = E_ALL ^ E_NOTICE ^ E_WARNING
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
Offline
My errors are always shut off in php.ini. I turn them on as needed at run time.
ini_set('display_errors','0'); // set to 0 for production systems, 1 for debug systems
Let's see what the programs report.
% php -i | grep 'display_errors'
display_errors => Off => Off
Create a php web page with this code and view it.
<?php echo "It works for ".$_SERVER["REMOTE_ADDR"]; phpinfo(); ?>
Last edited by severach (2017-08-14 03:09:13)
Offline
Thank you for the reply.
display_error setting is there in php.ini two times.
Second time it is configured as Off.
Changed it to On.
Now php showing errors are working.
Thank you again..
; stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
; On or stdout = Display errors to STDOUT
; Default Value: On
; Development Value: On
; Production Value: Off
; http://php.net/display-errors
display_errors = On
display_errors = On
Offline