Jump to content

Recommended Posts

So I get this message:

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /homepages/44/d272374679/htdocs/blog/index.php5:4) in /homepages/44/d272374679/htdocs/blog/index.php5 on line 5

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /homepages/44/d272374679/htdocs/blog/index.php5:4) in /homepages/44/d272374679/htdocs/blog/index.php5 on line 5

 

I am running PHP 5 on my PC and on my hosting yet I get no errors on my PC while running my code but once I uploaded that to the server I got them and can't explain it.

 

Here is my code at and around line 5.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
session_start(); //line 5 is here
$dbuser = "dbo314611366";
$dbpass = "rabbitowner";
$dbhost = "db2225.perfora.net";
$dbname = "db314611366";


?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

 

Link to comment
https://forums.phpfreaks.com/topic/188655-php-session-error/
Share on other sites

Ummm. A HTML doctype, a HTML <html> opening tag, and a HTML <head> tag are all HTML...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

Link to comment
https://forums.phpfreaks.com/topic/188655-php-session-error/#findComment-995971
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.