I'm having a slight problem and I hope you may be able to help me. I'm not a programmer or a coder but I just want to fix some troubles with my project.
Here is the context. I need to install and use one of my project (eCommerce website) offline on my notebook (HP – Windows7). So I have already installed Appserv and import the databases. I also copy paste all the files in the www/name of the project folders. The website is in PHP and Javascript. No CMS and the CSS templates have been designed internally.
I started the website offline using localhost and I opened the admin log in page. I entered my Log in and password and I got the following message:
*"
Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at C:\AppServ\www\thailema_v2\controller\admin\login.php:1) in C:\AppServ\www\thailema_v2\controller\admin\login.php on line 3
Warning: Cannot modify header information – headers already sent by (output started at C:\AppServ\www\thailema_v2\controller\admin\login.php:1) in C:\AppServ\www\thailema_v2\controller\admin\login.php on line 18
"*
So I couldn't reach my admin page and relaunch offline the functions I need. I have already read and tried some proposed solutions here but it did not change and there are some solutions I couldn't figure out as I'm not a professional programmer.
Anyway here is the code of the page:
<?php
ob_start();
session_start();
$path = '../';
include_once($path."include/check_lang.inc.php");
include_once($path."include/connect.php");
include_once($path."include/login.class.php");
$objLogin=new Login();
$check=$objLogin->getLogin($_POST["customer_username"],$_POST["customer_password"]);
if($check){
$url = $path."add_booking_info.php?lang=".$lang;
}else{
$url = $path."payment_step1.php?error=yes&lang=".$lang;
}
header("Location: ".$url);
ob_end_flush();
?>
So what I want to do is to log in the admin pages and use all the admin functions but at the moment I cannot even access the admin index pages because of that error.
Thanks a lot for your help and support…
Olivier
Best Answer
Make sure there is absolutely no whitespace before
<?php
Put
session_start()
beforeob_start()
instead of after it.If that fails, try commenting out the session_start() as one of your includes might already be starting the session, like so:
/** session_start(); **/