php - receiving internal server error from nginx -



php - receiving internal server error from nginx -

receiving internal server error fatal errors nginx when display_errors set 0.

i purposely triggers error using code $a = new abc(); in abc class doesn't exist.

errors logged in error.log file.

here code

//common error handling ini_set('display_startup_errors',0); ini_set('display_errors',0); ini_set('error_log','/var/log/nginx/error.log'); ini_set('log_errors',1); error_reporting(e_all|e_strict); define('debug_code',true); //echo lib_path.'/wallet/errorhandler.php';die; require_once lib_path.'/wallet/errorhandler.php'; register_shutdown_function('wallet_errorhandler::shutdownhandler'); set_exception_handler('wallet_errorhandler::uncaughtexceptionhandler'); set_error_handler('wallet_errorhandler::errorhandler'); $a = new abc();

same working on local wamp server. fatal errors gets caught in shutdownhandler function.

here output @ local machine:

script not excecuted! ----------------------------1:start------------------------------- source : error message : error: class 'abc' not found code : 1 file : x:\websdk\wallet\branches\wallet_version_1.0.1\billing_services\psm\public\index.php line : 37 trace : #0 x:\websdk\wallet\branches\wallet_version_1.0.1\billing_services\psm\library\wallet\errorhandler.php(69): wallet_errorhandler::errorhandler(1, 'class 'abc' not...', 'x:\websdk\walle...', 37, null, null) #1 [internal function]: wallet_errorhandler::shutdownhandler() #2 {main} ----------------------------------end-------------------------------

thanks, shiv

you cannot write out of fatal errors unfortunately. you're trying accomplish isn't possible.

php linux nginx

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

Set Up Of Common Name Of SSL Certificate To Protect Plesk Panel -