【发布时间】:2013-03-03 05:24:37
【问题描述】:
我正在尝试帮助将第三方主题安装到 WordPress 安装中,当我单击“实时预览”或“激活”主题时收到以下三个错误代码:
警告:session_start() [function.session-start]: open(/var/chroot/home/content/66/5232766/tmp/sess_1n0eifrftmjfu96hop17kihi35, O_RDWR) failed: No such file or directory (2) in /home /content/66/5232766/html/wp-content/themes/Drlawyer/functions.php 在第 461 行
警告:session_start() [function.session-start]:无法发送会话 cookie - 标头已由(输出开始于 /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions。 php:461) 在 /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php 第 461 行
警告:session_start() [function.session-start]:无法发送会话缓存限制器 - 标头已发送(输出开始于 /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions。 php:461) 在 /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php 第 461 行
我该如何解决这些问题?
【问题讨论】:
-
这是导致问题的代码:
function cp_admin_init() { if (!session_id()) session_start(); }我将此代码添加到上面的代码中:ini_set('session.save_path', 'tmp');现在它只在仪表板中给我这个错误代码,而不是在实际网站:Warning: session_start() [function.session-start]: open(tmp/sess_qrj5st7q63acsjrnsda545p6j2, O_RDWR) failed: No such file or directory (2) in /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php on line 462 -
这是它现在在仪表板上给出的另一个错误代码:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php:462) in /home/content/66/5232766/html/wp-content/themes/Drlawyer/functions.php on line 462
标签: wordpress