duanmoen784988 2015-09-17 12:38
浏览 38

Codeigniter 3控制器请求两次

I used codeigniter 3 to make the webservices for an application. At random the result is a fatal error:

Severity: Core Warning --> Module 'tidy' already loaded Unknown 0

From what i see in the log it looks that the request is made twice.

INFO - 2015-09-17 15:20:25 --> Config Class Initialized
INFO - 2015-09-17 15:20:25 --> Hooks Class Initialized
DEBUG - 2015-09-17 15:20:25 --> UTF-8 Support Enabled
INFO - 2015-09-17 15:20:25 --> Utf8 Class Initialized
INFO - 2015-09-17 15:20:25 --> URI Class Initialized
INFO - 2015-09-17 15:20:25 --> Router Class Initialized
INFO - 2015-09-17 15:20:25 --> Output Class Initialized
INFO - 2015-09-17 15:20:25 --> Security Class Initialized
DEBUG - 2015-09-17 15:20:25 --> Global POST, GET and COOKIE data sanitized
INFO - 2015-09-17 15:20:25 --> Input Class Initialized
INFO - 2015-09-17 15:20:25 --> Language Class Initialized
DEBUG - 2015-09-17 15:20:25 --> START API CALL
INFO - 2015-09-17 15:20:25 --> Loader Class Initialized
DEBUG - 2015-09-17 15:20:25 --> Config file loaded: /application/config/site.php
INFO - 2015-09-17 15:20:25 --> Helper loaded: url_helper
INFO - 2015-09-17 15:20:25 --> Helper loaded: form_helper
INFO - 2015-09-17 15:20:25 --> Helper loaded: ai_helper
INFO - 2015-09-17 15:20:25 --> Helper loaded: security_helper
INFO - 2015-09-17 15:20:25 --> Helper loaded: language_helper
INFO - 2015-09-17 15:20:25 --> Language file loaded: language/english/admin_lang.php
DEBUG - 2015-09-17 15:20:25 --> Config file loaded: /application/config/ion_auth.php
INFO - 2015-09-17 15:20:25 --> Email Class Initialized
INFO - 2015-09-17 15:20:25 --> Language file loaded: language/english/ion_auth_lang.php
INFO - 2015-09-17 15:20:25 --> Helper loaded: cookie_helper
INFO - 2015-09-17 15:20:25 --> Session: Class initialized using 'files' driver.
INFO - 2015-09-17 15:20:25 --> Model Class Initialized
INFO - 2015-09-17 15:20:25 --> Model Class Initialized
INFO - 2015-09-17 15:20:25 --> Database Driver Class Initialized
INFO - 2015-09-17 15:20:25 --> Helper loaded: date_helper
INFO - 2015-09-17 15:20:25 --> Form Validation Class Initialized
INFO - 2015-09-17 15:20:25 --> Controller Class Initialized
INFO - 2015-09-17 15:20:25 --> Language file loaded: language/english/form_validation_lang.php
INFO - 2015-09-17 15:20:25 --> Model Class Initialized
INFO - 2015-09-17 15:20:25 --> Model Class Initialized
INFO - 2015-09-17 15:20:25 --> Final output sent to browser
DEBUG - 2015-09-17 15:20:25 --> Total execution time: 0.0221
DEBUG - 2015-09-17 15:20:25 --> END API
ERROR - 2015-09-17 15:20:25 --> Severity: Core Warning --> Module 'tidy' already loaded Unknown 0
INFO - 2015-09-17 15:20:25 --> Config Class Initialized
INFO - 2015-09-17 15:20:25 --> Hooks Class Initialized
DEBUG - 2015-09-17 15:20:25 --> UTF-8 Support Enabled
INFO - 2015-09-17 15:20:25 --> Utf8 Class Initialized
INFO - 2015-09-17 15:20:25 --> URI Class Initialized
INFO - 2015-09-17 15:20:25 --> Router Class Initialized
INFO - 2015-09-17 15:20:25 --> Output Class Initialized
INFO - 2015-09-17 15:20:25 --> Security Class Initialized
DEBUG - 2015-09-17 15:20:25 --> Global POST, GET and COOKIE data sanitized
INFO - 2015-09-17 15:20:25 --> Input Class Initialized
INFO - 2015-09-17 15:20:25 --> Language Class Initialized
DEBUG - 2015-09-17 15:20:25 --> START API CALL
INFO - 2015-09-17 15:20:25 --> Loader Class Initialized
DEBUG - 2015-09-17 15:20:25 --> Config file loaded: /application/config/site.php
INFO - 2015-09-17 15:20:25 --> Helper loaded: url_helper
INFO - 2015-09-17 15:20:25 --> Helper loaded: form_helper
INFO - 2015-09-17 15:20:25 --> Helper loaded: ai_helper
INFO - 2015-09-17 15:20:25 --> Helper loaded: security_helper
INFO - 2015-09-17 15:20:25 --> Helper loaded: language_helper
INFO - 2015-09-17 15:20:25 --> Language file loaded: language/english/admin_lang.php
DEBUG - 2015-09-17 15:20:25 --> Config file loaded: /application/config/ion_auth.php
INFO - 2015-09-17 15:20:25 --> Email Class Initialized
INFO - 2015-09-17 15:20:25 --> Language file loaded: language/english/ion_auth_lang.php
INFO - 2015-09-17 15:20:25 --> Helper loaded: cookie_helper
INFO - 2015-09-17 15:20:25 --> Session: Class initialized using 'files' driver.
INFO - 2015-09-17 15:20:25 --> Model Class Initialized
INFO - 2015-09-17 15:20:25 --> Model Class Initialized
INFO - 2015-09-17 15:20:25 --> Database Driver Class Initialized
INFO - 2015-09-17 15:20:25 --> Helper loaded: date_helper
INFO - 2015-09-17 15:20:25 --> Form Validation Class Initialized
INFO - 2015-09-17 15:20:25 --> Controller Class Initialized
INFO - 2015-09-17 15:20:25 --> Language file loaded: language/english/form_validation_lang.php
INFO - 2015-09-17 15:20:25 --> Model Class Initialized
INFO - 2015-09-17 15:20:25 --> Model Class Initialized
INFO - 2015-09-17 15:20:25 --> Final output sent to browser
DEBUG - 2015-09-17 15:20:25 --> Total execution time: 0.0135
DEBUG - 2015-09-17 15:20:25 --> END API

START API CALL is showing in the construct function of the controller

END API is showing in the _return_output function

$this->output->set_header("Pragma: no-cache");
$this->output->set_header("Cache-Control: no-store, no-cache");
$this->output->set_status_header(200);
$this->output->set_content_type('application/json')->set_output(json_encode($content));
$this->output->_display();
log_message('debug', 'END API');
exit(); 

Any idea how to prevent the controller to be requested twice?

Thanks

Edit

Api calls:

http://domain.dev/api/v1/init
http://domain.dev/api/v1/get_articles

Routes:

$route['api/v1/(:any)'] = '/api/api/$1';
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
    • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
    • ¥20 软件测试决策法疑问求解答
    • ¥15 win11 23H2删除推荐的项目,支持注册表等
    • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
    • ¥15 qt6.6.3 基于百度云的语音识别 不会改
    • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
    • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
    • ¥15 lingo18勾选global solver求解使用的算法
    • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行