Cannot modify header information - headers already sent by ...

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 as login 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. See this and this forum thread for some recommendations for editors to use on Windows. Unix/Linux users can't go wrong with vi.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值