enable error logging php
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
enable error logging php
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
php set error log file
ini_set("log_errors", 1); // Enable error logging
ini_set("error_log", "/tmp/php-error.log"); // set error path
error_log( "Hello, errors!" ); // log a test error
php error log
/usr/local/apache/logs/error_log
php error log
// Php Error Log
error_log("Error message");
// Log and Array
error_log( print_r( [
__METHOD__,
'error_key_1' => 'error_value'
] ) );
output to log file and error to log error
./ShellFile.sh >& pathToLogFile.log
error php
// how to display php errors on your browser :
// first step, create an error function :
$errors = array();
// now you have just to insert the function like this :
if (........){
$errors['the_name_of_the_error']='the error message';
}
// example :
// we want to display an error when the user does not correctly fill,
// in the 'password' box when registering on your website :
if(empty($_POST['password']) ||
$_POST['password'] != $_POST['password_confirm']){
$errors['errors']= "You must enter a valid password";
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us