I have 2 pages one is index.php other is classes.php
should not this work classes.php:
<?php
ob_start();
session_start();
?>
index.php:
<?php
include "classes.php";
error_reporting(E_ALL);
echo "Loaded";
?>
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /public_html/index.php:1) in /public_html/includes/classes.php on line 2
Make sure you do not send anything before anything regarding session is executed.
That means:
<?php,?>tags (they are not required and often harmful),The problem you experienced is caused by something that is before “
<?php” withinindex.phpfile (it may be a space, tab, end of line or anything else you did not show us), but if you follow the above rules, you should have this issue a lot less often during further development of your application.