i have set error reporting to 1 using php function error_reporting(1) but it has no effect on the server .actually i am working on a staging server using xampp.is there any settings which has to be enabled in server so that php error reporting settings can be changed.
Try changing the setting in \xampp\php\php.ini
, not via the error_reporting
function. Then restart the server, and you should be good to go.
You may also want to check that display_errors
is set to on. (Off the top of my head, though, XAMPP should be configured to display errors by default. Weird.)
Via FTP only, you can attempt to set these variables via ini_set
at the top of your script:
<?php
ini_set('display_errors', 1)
ini_set('error_reporting', 1)
?>
You may also want to try setting these variables through a .htaccess
file. Create a file called .htaccess
in the same directory as your script, and add these lines:
php_flag display_errors on
php_value error_reporting 1
Put this line ini_set('display_errors',1);
on the top of your php code.
just make .htaccess file and to it add
##Turn off display_errors##
php_flag display_errors off
save it into main directory and its done