[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 08-23-2007, 08:07 PM   #1 (permalink)
NamePros Regular
 
a1nerd's Avatar
 
Join Date: Apr 2004
Posts: 528
55.00 NP$ (Donate)

a1nerd is on a distinguished road


PHP Error Message

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 Code:
<?php
session_start
();
define("DB_HOST"            , "localhost");
define("DB_NAME"            , "sddave23_avs");
define("DB_USERNAME"        , "sddave23_avs");
define("DB_PASSWORD"        , "123456");
define("CONTACT_EMAIL"        , "info@cotonalba.co.uk");

$conn = mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD);
mysql_select_db(DB_NAME, $conn);
?>
a1nerd is offline  
Old 08-23-2007, 09:45 PM   #2 (permalink)
cef
NamePros Regular
 
Join Date: May 2004
Location: NYC
Posts: 236
76.50 NP$ (Donate)

cef is a jewel in the roughcef is a jewel in the roughcef is a jewel in the rough

Animal Rescue
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.
cef is offline  
Old 08-23-2007, 11:04 PM   #3 (permalink)
NamePros Regular
 
a1nerd's Avatar
 
Join Date: Apr 2004
Posts: 528
55.00 NP$ (Donate)

a1nerd is on a distinguished road


I have no idea, i dont know php.

Quote:
Originally Posted by cef
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.
a1nerd is offline  
Old 08-24-2007, 12:31 AM   #4 (permalink)
Senior Member
 
Xyzer's Avatar
 
Join Date: Aug 2005
Location: United Kindom
Posts: 1,506
90.70 NP$ (Donate)

Xyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to all

Tsunami Relief AIDS/HIV
It's something in: http://www.createseo.com/avs/vtr.php
Can you please paste that files code and we can fix it for you...
Xyzer is offline  
Old 08-24-2007, 02:27 AM   #5 (permalink)
Joe
Senior Member
 
Join Date: Oct 2005
Location: Kent ~ U.K.
Posts: 3,246
88.85 NP$ (Donate)

Joe has much to be proud ofJoe has much to be proud ofJoe has much to be proud ofJoe has much to be proud ofJoe has much to be proud ofJoe has much to be proud ofJoe has much to be proud ofJoe has much to be proud ofJoe has much to be proud ofJoe has much to be proud of

Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
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
Joe is offline  
Old 08-24-2007, 03:58 AM   #6 (permalink)
Adrian
 
Hitch's Avatar
 
Join Date: Aug 2005
Location: Uk, South Yorkshire
Posts: 1,227
16.00 NP$ (Donate)

Hitch is a splendid one to beholdHitch is a splendid one to beholdHitch is a splendid one to beholdHitch is a splendid one to beholdHitch is a splendid one to beholdHitch is a splendid one to beholdHitch is a splendid one to behold

Animal Rescue Third World Education Find Marrow Donors!
Try this,

PHP Code:
  <?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"        , "info@cotonalba.co.uk");

$conn = mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD);
mysql_select_db(DB_NAME, $conn);
?>
__________________
NamePros
Hitch is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 05:12 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85