简体   繁体   English

无法在Codeigniter中修改标头信息错误-Google App Engine

[英]Cannot modify header information error in Codeigniter - Google App Engine

I'm getting the following error in codeigniter once I deploy it in server. 将其部署到服务器后,我在codeigniter中收到以下错误。 I do not get this error in localhost. 我在localhost中没有收到此错误。 I'm not sure where I'm going wrong. 我不确定我要去哪里。 Any suggestions. 有什么建议么。 I'm using Google Apps Engine. 我正在使用Google Apps Engine。

Fatal error: Call to a member function result_array() on a non-object 
in /base/data/home/apps/s~some-app/1.401263586523638658/application/models/Some_model.php on line 199
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /base/data/home/apps/s~some-app/1.401263586523638658/application/models/Some_model.php:199)

Filename: core/Common.php

Line Number: 569

Backtrace:

A PHP Error was encountered

Severity: Error

Message: Call to a member function result_array() on a non-object

Filename: models/Some_model.php

Line Number: 199

Backtrace:

I checked the controller and models for any white space and I do not have any such. 我检查了控制器和模型中是否有空白,但没有任何空白。 This particular function is also not used by any cron job as mentioned in another post. 如另一篇文章所述,任何cron作业也未使用此特定功能。

Edited to add code: 编辑添加代码:

$query = "select u.id, u.queue_name, u.queue_email, u.tickets_for_all  
                    from agent_queue_mapping_table as m, queue_table as u 
                    where u.id=m.queue_id 
                    and u.company_id = ".$this->session->userdata('user_comp_id')." 
                    and m.user_id = ".$this->session->userdata('user_id');
    $queue_details = $this->db->query($query);                       
    return $queue_details->result_array();

1.Check the PHP version of your server. 1.检查服务器的PHP版本。

2.Get your SQL query by using $this->db->last_query() and run the query on MySQL console and check if there any errors. 2.使用$ this-> db-> last_query()获取SQL查询,并在MySQL控制台上运行查询,并检查是否存在任何错误。

3.Check the result_array() array function usage in your controller. 3.检查控制器中的result_array()数组函数用法。 send us your screenshot of the code here to check on that section 将您的代码屏幕截图发送给我们,以检查该部分

I got this error, because I had not updated a table that I had to alter. 我收到此错误,因为我没有更新必须更改的表。 Once I did that, this issue got resolved. 一旦这样做,这个问题就解决了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM