Jump to content
php.lv forumi

Cannot send session cookie - headers already sent by


renathy

Recommended Posts

Kādēļ ir tā, ka uz mana servera šis warnings (Cannot send session cookie - headers already sent by.. un pēc tam arī headers already send) neparādās, bet uzliekot uz klienta - parādās.

 

Man ir šāds index.php fails (nekā cita tur iekšā nav)

<?php

session_start();

?>

 

Uz klienta servera rāda kļūdu:

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at ......./index.php:1) in ...../index.php on line

 

Es pārbaudīju, ka nekādas liekas atstarpes nekur kodā nav.

Tad es saglabāju failu nevis UTF8, bet ANSI kodējumā (notepad++). Un viss aizgāja... Vai kāds zina kāpēc tā notiek?

Edited by renathy
Link to comment
Share on other sites

Manā gadījumā tiešām bija UTF without Bom.

Bet tagad es uzliku visiem failiem to UTF without BOM un man kkā pazuda garumzīmes - tagad lapā nav garumzīmju (t.i., kodā ierakstu "āēūī", parādās ķeburi).

Nez, varbūt es vēl kko citu izdarīju.

 

VISS SKAIDRS. KĻŪDA IZLABOTA.

Edited by renathy
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...