PyroCMS - 无法发送会话缓存限制器 - 已发送的标头

时间:2013-06-12 05:58:11

标签: php codeigniter session pyrocms php-ini

我在托管测试服务器上测试PyroCMS模块后收到错误。

我认为它与php.ini文件和会话有关(我已经在phpinfo输出中包含了一个子集)。

每次启动/重新启动会话时都会出现此问题。

出现错误的php代码

if ($this->input->get('session')) {
    session_id($this->input->get('session'));
    session_regenerate_id();
}

* 我得到的错误*

A PHP Error was encountered

Severity: Warning    

Message: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home2/client555/public_html/addons/staging_twoducks/modules/shop/controllers/checkout.php:1)

Filename: hooks/pick_language.php

Line Number: 30

phpinfo(会话设置)

 session
 -----------------
 Session Support                  | enabled
 Registered save handlers         | files user sqlite
 Registered serializer handlers      | php php_binary


 Directive             Local Value  Master Value
 -------------------------------------------------------
 session.auto_start        Off  Off
 session.bug_compat_42         On   On
 session.bug_compat_warn           On   On
 session.cache_expire          180  180
 session.cache_limiter         nocache  nocache
 session.cookie_domain         no value no value
 session.cookie_httponly           Off  Off
 session.cookie_lifetime           0    0
 session.cookie_path           /    /
 session.cookie_secure         Off  Off
 session.entropy_file          no value no value
 session.entropy_length        0    0
 session.gc_divisor                100  100
 session.gc_maxlifetime        1440 1440
 session.gc_probability        1    1
 session.hash_bits_per_character    4   4
 session.hash_function          0   0
 session.name                      PHPSESSID     PHPSESSID
 session.referer_check         no value no value
 session.save_handler          files    files
 session.save_path                 /tmp /tmp
 session.serialize_handler         php  php
 session.use_cookies           On   On
 session.use_only_cookies          On   On
 session.use_trans_sid         0    0

1 个答案:

答案 0 :(得分:0)

事实证明我只需要在我的ini文件中更改这两个设置

output_buffering = On
safe_mode = Off