0

在我的托管测试服务器上测试我的 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
4

1 回答 1

0

原来我只需要在我的 ini 文件中更改这两个设置

output_buffering = On
safe_mode = Off
于 2013-06-12T09:35:17.670 回答