Jump to content
php.lv forumi

Headers allready sent...


Robis

Recommended Posts

Sveiki!

Interesanti, ka man radas shadi pazinjojumi:

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/html/admin/index.php:1) in /var/www/html/admin/index.php on line 6

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/html/admin/index.php:1) in /var/www/html/admin/index.php on line 6

 

 

Bet attieciga index.php faila sakums ir shads:

 

<?php

ob_start();

 

error_reporting(E_ALL);

 

session_start(); // 6. rinda

 

Kas notiek talak nav svarigi! Esmu megjinajis mainit secibu shim komandam, vienmer parada to pashu kljudu un vienmer to rindu, kura ir session_start()!

 

Kas tur varetu but par vainu?

Link to comment
Share on other sites

to session_start() raksti pirms visaam komandaam - tobish tuuliit aiz pirmaa "<?".

Jau kaut ko izvadiisi pirms sesijas saakshanas, raadiis shito erroru!

12837[/snapback]

wrong.

nejau session_start() tā vaina. visdrīzāk, tiešām - notepad ir pielicis savus 3 utf-8 baitus.

pirms session_start() var tikt izpildītas dajebkādas komandas ar nosacījumu ka tās neko neizvada (netiek nosūtīti standarta headeri, kā content-type, utt. tb ne headeri bet saturs (kas protams izraisa arī headeru nosūtīšanu :))

Edited by tamster
Link to comment
Share on other sites

×
×
  • Create New...