jjzjj

signal_handler

全部标签

php - Laravel 使用 Monolog\Handler\BrowserConsoleHandler 进行日志记录

如何将Laravel5的日志更改为Monolog\Handler\BrowserConsoleHandler?什么在Laravel5中不有效,但在独立的PHP文件中有效:useIlluminate\Support\Facades\Log;useMonolog\Handler\BrowserConsoleHandler;useMonolog\Logger;//createalogchannel$log=Log::getMonolog();//$log=newLogger('Testlogger');//doesn'tmakeanydifference$log->pushHandler(n

php - set_error_handler 函数不调用自动加载

我将set_error_handler()函数设置为在出现错误时调用函数。在那个函数中我有自己的异常类实现:functionacs_error_handler($errno,$errstr,$errfile,$errline){thrownewacs_exception($errstr,$errno);}这给了我以下错误:Fatalerror:Class'acs_exception'notfound出于某种原因,这个函数没有调用我设置的自动加载函数:spl_autoload_register('__autoload');如果我添加一行:__autoload('acs_exception

php - 父级 : Received shutdown signal -- Shutting down the server

使用wampserver并收到此错误:Parent:Receivedshutdownsignal--Shuttingdowntheserver.Google似乎没有任何有效的解决方案。有什么想法吗?[MonJul2519:07:022011][warn]NameVirtualHost*:80hasnoVirtualHosts[MonJul2519:07:022011][notice]Child5828:Childprocessisrunning[MonJul2519:07:022011][notice]Child5828:Acquiredthestartmutex.[MonJul251

php - 为生产覆盖 Kohana_Exception::_handler() - 3.3

我正在使用Kohana3.3并且我阅读了这个forumpost.它说,为了防止向最终用户显示堆栈跟踪,我需要覆盖Kohana_Exception::_handler()以对向上渗透的错误做一些不同的事情。这是否意味着覆盖Kohana_Exception并添加以下函数?publicstaticfunction_handler(Exception$e){try{//LogtheexceptionKohana_Exception::log($e);//Generatetheresponse//insteadofbelowline://$response=Kohana_Exception::r

php - WP 休息 API : new route return rest_invalid_handler

这是一个用于创建新路由的简单测试脚本:add_action('rest_api_init',function(){register_rest_route('ass','/ativar',array('methods'=>'GET','callback'=>'testing_route',));});functiontesting_route($data){returnarray('message'=>'testingroute');}但它返回错误信息:rest_invalid_handler 最佳答案 解决了!'callback'=

php - Phalcon教程报错PhalconException : TestController handler class cannot be loaded

我在使用Phalcon教程1时遇到了一些问题。最后,我在Github上克隆了它的版本,以确保我没有遗漏任何东西;仍然从中获得相同的行为。将浏览器指向本教程中所示的localhost/test会给出:`"PhalconException:TestControllerhandlerclasscannotbeloaded".但是,转到localhost/test.php会加载“Hello!”正确测试消息。Phalcon显示在phpinfo()和get_loaded_extensions()中。即使从克隆了教程,我也得到了这种行为https://github.com/phalcon/tutor

不调用 PHP pcntl_signal 回调

这是完整的可重现代码。=')){pcntl_signal_dispatch();console::log("Signaldispatched");}echo"Runninganinfiniteloop\n";while(true){sleep(1);echodate(DATE_ATOM)."\n";}当我运行它时,我每秒都会看到日期值。现在,如果我按Ctrl+C,则不会调用cleanup函数。事实上signal_handler并没有被调用。这是示例输出。$phptestsignal.phpSignaldispatchedRunninganinfiniteloop2012-10-04T1

PHP PCNTL - pcntl_signal() 的 restart_syscalls 参数有什么作用?

我一直在使用PHP的PCNTLextension现在有一段时间了,但无法弄清楚pcntl_signal()的restart_syscalls参数是什么做。我尝试在Internet上四处寻找,但找不到任何信息。所有文档都说:"Specifieswhethersystemcallrestartingshouldbeusedwhenthissignalarrives."什么是“系统调用重启”? 最佳答案 假设您将信号处理程序编程为使用以下信号停止进程:SIGTERM:终止进程;与SIGKILL不同,它可以被阻止、处理和忽略。SIGKILL

php - 授权.net API 错误 : Class 'Goetas\Xsd\XsdToPhp\Jms\Handler\BaseTypesHandler' not found

我在这里使用“快速使用示例(使用信用卡收费-授权和捕获)”:https://github.com/AuthorizeNet/sdk-php我在将代码托管在heroku上时遇到了这个错误:PHPDeprecated:Automaticallypopulating$HTTP_RAW_POST_DATAisdeprecatedandwillberemovedinafutureversion.inUnknownonline0要避免此警告,请在php.ini中将'always_populate_raw_post_data'设置为'-1'并改用php://input流。local.ERROR:ex

php - Codeigniter 中的 set_error_handler?

我创建了一些帮助程序来捕获任何PPH错误,然后发送一个curl帖子,这将使用我的错误跟踪软件创建一个票证。但我无法让它与Codeigniter一起工作。这是我的代码:'Error',E_WARNING=>'Warning',E_PARSE=>'ParsingError',E_NOTICE=>'Notice',E_CORE_ERROR=>'CoreError',E_CORE_WARNING=>'CoreWarning',E_COMPILE_ERROR=>'CompileError',E_COMPILE_WARNING=>'CompileWarning',E_USER_ERROR=>'Us