How to solve Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at

#1

Warning : session_start(): Cannot send session cache limiter - headers already sent (output started at <?php

session_start();

include("…/prossec/connect.php");

$id_usar =$_SESSION['username'];


$query_news =  "SELECT dr.name_dr,dr.imag_dr,newos_privet_usr.tha_newos FROM newos_privet_usr INNER JOIN dr ON dr.id_dr=newos_privet_usr.id_publisher INNER JOIN item_students_dragat ON item_students_dragat.id_item =newos_privet_usr.id_item WHERE item_students_dragat.id_studen= '{$id_usar}' ORDER BY `newos_privet_usr`.`id_newos` DESC" ;

$result_news = mysqli_query($connection, $query_news);

if(!$result_news){
header(‘Location: …/index.php’);

} ;

?>

#2

Try clearing browser data else try add the following code to your .htaccess and try again…

php_value output_buffering on
#3

Some good ideas there though.

#4

I did not find a solution in this

#5

This is my code

<?php

    session_start();
 

include("../prossec/connect.php");



	$id_usar =$_SESSION['username'];

	
	$query_news =  "SELECT dr.name_dr,dr.imag_dr,newos_privet_usr.tha_newos FROM newos_privet_usr INNER JOIN dr ON dr.id_dr=newos_privet_usr.id_publisher INNER JOIN item_students_dragat ON item_students_dragat.id_item =newos_privet_usr.id_item WHERE item_students_dragat.id_studen= '{$id_usar}' ORDER BY `newos_privet_usr`.`id_newos` DESC" ;

$result_news = mysqli_query($connection, $query_news);



if(!$result_news){
header('Location: ../index.php');

	} ;
	
?>
#6

Maybe post your own topic on their site for a wider audience, this forum is generally for hosting system related issues.