We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yaf 3.0.4 PHP 7.0.12
请求5万次的情况下,有一定几率会出现 auto load 会到错误路径,回滚到 3.0.3 问题消失。
比如 $util = new Util_LocalIP();
正常情况是去加载
/data/release/framework/library/Util/LocalIP.php
但是 3.0.4 在日志中能看见一定几率出现去加载了
/data/release/framework/library/Util_LocalIP.php
日志内容:
critical | 24527 | 1478586810.319 | 2016:11:08 14:33:30 | Error - type:2 - file:/data/release/framework/library/Util/Request.php - line:268 - msg:Yaf_Loader::autoload (): Failed opening script /data/release/framework/library/Util_LocalIP.php: No such file or directory critical | 24527 | 1478586810.319 | 2016:11:08 14:33:30 | Error - type:1 - file:/data/release/framework/library/Util/Request.php - line:268 - msg:Uncaught Error: Clas s 'Util_LocalIP' not found in /data/release/framework/library/Util/Request.php:268
前台直接是 500 错误
初始化 loader 时的代码如下
public function _initLoader(Yaf_Dispatcher $dispatcher) { Yaf_Loader::getInstance()->setLibraryPath(ROOT_PATH . '/framework/library', true); $dispatcher->setRequest(new Controller_Request()); Yaf_Loader::getInstance()->setLibraryPath(APP_PATH . '/src/controllers'); Yaf_Loader::getInstance()->registerLocalNamespace("Backend"); }
The text was updated successfully, but these errors were encountered:
这个又找到解决方案吗?
Sorry, something went wrong.
你可以试试最新版的yaf, 应该已经解决了
3.0.5-dev还是有这个问题啊,有时候找到文件提示找不到类,全都是library下自动加载问题,错误率还挺高的
No branches or pull requests
Yaf 3.0.4
PHP 7.0.12
请求5万次的情况下,有一定几率会出现 auto load 会到错误路径,回滚到 3.0.3 问题消失。
比如
$util = new Util_LocalIP();
正常情况是去加载
/data/release/framework/library/Util/LocalIP.php
但是 3.0.4 在日志中能看见一定几率出现去加载了
/data/release/framework/library/Util_LocalIP.php
日志内容:
critical | 24527 | 1478586810.319 | 2016:11:08 14:33:30 | Error - type:2 - file:/data/release/framework/library/Util/Request.php - line:268 - msg:Yaf_Loader::autoload
(): Failed opening script /data/release/framework/library/Util_LocalIP.php: No such file or directory
critical | 24527 | 1478586810.319 | 2016:11:08 14:33:30 | Error - type:1 - file:/data/release/framework/library/Util/Request.php - line:268 - msg:Uncaught Error: Clas
s 'Util_LocalIP' not found in /data/release/framework/library/Util/Request.php:268
前台直接是 500 错误
初始化 loader 时的代码如下
The text was updated successfully, but these errors were encountered: