Dean OBrien
asked on
Warning: session_start() [function.session-start]: Cannot send session cookie
Experts,
I have moved a new site from a development server to the live server and am getting problems (not present on dev server).
PHP seems to be complaining about the use of session_start() function. I have searched the web looking for answers and each thread seems to imply it is due to having space in php file before calling the function, however, i definitely dont have any space....
http://www.claibon.co.uk/february13/login.php
Here is the top half of the code:
Any suggestions on how to resolve this would be greatly appreciated
Easynow
I have moved a new site from a development server to the live server and am getting problems (not present on dev server).
PHP seems to be complaining about the use of session_start() function. I have searched the web looking for answers and each thread seems to imply it is due to having space in php file before calling the function, however, i definitely dont have any space....
http://www.claibon.co.uk/february13/login.php
Here is the top half of the code:
<?php
session_start();
if (isset($_GET['task'])) {
$task=$_GET['task'];
} else {
$task="login";
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Claibon Recruitment</title>
<meta name="description" content="Claibon Recruitment" />
<meta name="author" content="Sure Media">
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400' rel='stylesheet' type='text/css'>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="shortcut icon" href="flavicon.ico" />
</head>
<body>
<div id="container" itemscope itemtype="http://data-vocabulary.org/Organization">
<header>
<div id="contact">
GET IN TOUCH:
Any suggestions on how to resolve this would be greatly appreciated
Easynow
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks for the info guys
ASKER
It appears it was indeed down to encoding.
I confess to know very little about character encoding.. i add the meta tag to state utf-8 and save as utf-8 in notepad normally.
The only way i was able to get this working just now was to save as ANSI... any ideas why? should i change character encoding tags within doc?
Will close and award points very shortly.
Thanks for solution.
Regards
Easynow