Вопрос

My kohana 3.3 site contains page, which I implemented like:

$block_center = 'here is html form';
$this->template->block_center = array($block_center);

Of course, I used constructions like View::factory(' .. ')->bind ... - doesn't matters (result is the same).

When running site on xampp v3.0.12, It works correctly. But when I run it on hosting (Apache/2.2.22 (Unix) PHP/5.3.8) - the fun starts:
Four unexpected symbols appear on top of the page before html tag (for example: 5aeb) and after /html in bottom of the page appears 0.
When I reduce the amount of html code (in "block_center"), symbols are changing (seems like diminishing) to 2469, 22b4 and so on. And if I leave nearly ten lines of code, unexpected symbols disappear.

Can anybody help me recognize the reason of this unexpected output in kohaha? Thanks in advance.

Это было полезно?

Решение

Check your HTTP protocol headers. It seems like Kohana uses HTTP/1.1 by default, while your server not. Just compare $_SERVER['SERVER_PROTOCOL'] and HTTP headers (with firebug for example). Note that you can set/get protocol value with Request::protocol() and Response::protocol().

These links may be helpful: 1, 2

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top