Cannot modify header information - headers already sent by ...
来源:互联网 发布:淘宝网站的盈利来源 编辑:程序博客网 时间:2024/04/30 11:29
This problem is actually listed in the "common problems" section of the installation instructions, but many users only seem to run into it when they start configuring their site after the initial setup. So here we go again:
This is commonly known as the "whitespace problem".
The error message typically looks something like
Warning: Cannot modify header information - headers already sent by (output started at /path/to/geeklog/public_html/config.php:581) in /path/to/geeklog/public_html/system/lib-sessions.php on line 180
(line numbers and file names may vary). The problem is that many editors seem to add additional blanks (spaces) and/or empty lines at the end of a file when you edit it. This so-called whitespace is then sent to the browser when the file is loaded and interferes with the header of a page that Geeklog tries to send to the browser, often causing problems such aslogin problems.
The fix is, obviously, to remove that whitespace from the file. Read the error message carefully. It says "output started at ..." followed by a file name and a line number. That is the file (and line) that you need to edit. Ignore the second file name - that is only a file that included the file that has the whitespace. The first file is the one you have to edit, not the second one.
Since the editor you've been using caused this problem in the first place, you should use another editor to fix the problem and remove the whitespace. Seethis andthis forum thread for some recommendations for editors to use on Windows. Unix/Linux users can't go wrong withvi.
This is commonly known as the "whitespace problem".
The error message typically looks something like
Warning: Cannot modify header information - headers already sent by (output started at /path/to/geeklog/public_html/config.php:581) in /path/to/geeklog/public_html/system/lib-sessions.php on line 180
(line numbers and file names may vary). The problem is that many editors seem to add additional blanks (spaces) and/or empty lines at the end of a file when you edit it. This so-called whitespace is then sent to the browser when the file is loaded and interferes with the header of a page that Geeklog tries to send to the browser, often causing problems such aslogin problems.
The fix is, obviously, to remove that whitespace from the file. Read the error message carefully. It says "output started at ..." followed by a file name and a line number. That is the file (and line) that you need to edit. Ignore the second file name - that is only a file that included the file that has the whitespace. The first file is the one you have to edit, not the second one.
Since the editor you've been using caused this problem in the first place, you should use another editor to fix the problem and remove the whitespace. Seethis andthis forum thread for some recommendations for editors to use on Windows. Unix/Linux users can't go wrong withvi.
- 解决Warning: Cannot modify header information - headers already sent by ......
- 解决Warning: Cannot modify header information - headers already sent by
- php错误"Cannot modify header information - headers already sent by"
- php错误"Cannot modify header information - headers already sent by"
- Cannot modify header information - headers already sent by错误解决办法
- Cannot modify header information - headers already sent by错误解决办法
- Cannot modify header information - headers already sent by错误解决办法
- Cannot modify header information - headers already sent by错误解决办法
- Cannot modify header information - headers already sent by错误解决办法
- Cannot modify header information - headers already sent by错误解决办法
- Cannot modify header information - headers already sent by错误解决办法
- Warning: Cannot modify header information - headers already sent by
- Cannot modify header information – headers already sent by解决
- 解决cannot modify header information - headers already sent by (......)。
- Cannot modify header information - headers already sent by
- 解决cannot modify header information - headers already sent by (......)。
- “cannot modify header information – headers already sent by”解决方法
- Cannot modify header information - headers already sent by ...
- JNI实现回调| JNI调用JAVA函数|参数和返回值的格式
- 屏幕录制软件,挺好用的
- iOS -真机测试详细步骤
- 利用db2联邦数据库轻松实现程序部署
- 一个自动化任务抽象类
- Cannot modify header information - headers already sent by ...
- VC获取操作系统版本信息
- 仆人式管理风格
- 用Cpp11新template feature尝试metaprogramming
- 九度1006
- Task: 最简洁的iPhone任务管理App
- 关于函数在.c文件定义在.h文件声明与makefile
- 在上传图片前实现图片预览
- iOS-上传应用程序到app store