PHP session_start () oturumu oluşturmak için başarısız

0 Cevap php

Bunlar benim index.php benim ilk 5 satır şunlardır:

  <?php
session_start();
if (!isset($_SESSION['cart'])) $_SESSION['cart']='';
$page = $_GET['page'];
?>

and so on.. I'm looking at the sessions trough the firefox->firebug->firecookie plugin and a session is not created.(I am sure of it because the cart that worked yesterday doesnt work today.) Any ideas why this might happen and how to fix it ?

I found this when enabling errors: Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/controll/public_html/metalkonsult.com/index.php:1) in /home/controll/public_html/metalkonsult.com/index.php on line 2

Ben daha araştırdı - şey tarayıcınıza gönderilen IS ama onun nereden geldiğini bilmiyorum. Ben bir var_dump (headers_list ()) yaptı; ilk satırda ve bu ne olsun:

array(2) { [0]=> string(23) "X-Powered-By: PHP/5.2.6" [1]=> string(23) "Content-type: text/html" }

Bunu nasıl kapatabilirim? Ne gönderiyor?

I set session.auto_start = 1 in php.ini in the website folder sessions work now.. dont know what caused the problems but problem is temporarily fixed

0 Cevap