PHP Error Message

SpaceshipSpaceship
Watch

a1nerd

Established Member
Impact
3
How do i fix this?

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/sddave23/public_html/avs/vtr.php:1) in /home/sddave23/public_html/avs/config.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/sddave23/public_html/avs/vtr.php:1) in /home/sddave23/public_html/avs/config.php on line 2

You can see the warning message at the top of this page
http://www.createseo.com/avs/vtr.php

It's on top of all pages containing PHP.

Here is the config.php file bellow

PHP:
<?php
session_start();
define("DB_HOST"			, "localhost");
define("DB_NAME"			, "sddave23_avs");
define("DB_USERNAME"		, "sddave23_avs");
define("DB_PASSWORD"		, "123456");
define("CONTACT_EMAIL"		, "[email protected]");

$conn = mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD);
mysql_select_db(DB_NAME, $conn);
?>
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains — AI StorefrontUnstoppable Domains — AI Storefront
Are you echoing any php output or displaying any html output before the point at which you include config.php in vtr.php?

That's usually the cause of this problem.
 
0
•••
I have no idea, i dont know php.

cef said:
Are you echoing any php output or displaying any html output before the point at which you include config.php in vtr.php?

That's usually the cause of this problem.
 
0
•••
0
•••
Here a few things to check:
  • You are not including a page which has already got session_start() in it, when you have declared session_start() in the actual page
  • You are including a page with session_start() at the VERY TOP of your page, before anything else
Hope this is of some help,
Joe
 
0
•••
Try this,

PHP:
  <?php

ob_start();

session_start();
define("DB_HOST"            , "localhost");
define("DB_NAME"            , "sddave23_avs");
define("DB_USERNAME"        , "sddave23_avs");
define("DB_PASSWORD"        , "123456");
define("CONTACT_EMAIL"        , "[email protected]");

$conn = mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD);
mysql_select_db(DB_NAME, $conn);
?>
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back