Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Header Problem

Posted on 2006-06-27
10
Medium Priority
?
298 Views
Last Modified: 2013-12-12
Hi everyone I have a very strange problem.I'm constantly reciveing same error

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/versatables.com/admins/testing/campaign_manager/manage_subscribers/add_subscribers.php:1) in /var/www/versatables.com/admins/testing/campaign_manager/manage_subscribers/add_subscribers.php on line 2

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/versatables.com/admins/testing/campaign_manager/manage_subscribers/add_subscribers.php:1) in /var/www/versatables.com/admins/testing/campaign_manager/manage_subscribers/add_subscribers.php on line 2

and here is my code(first 20 lines of them cause I supose that is all that You people need)

<?
      session_start();
      require_once("conf/db_connection.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Add/Remove Subscribers :: Select a method for adding/removing subscribers</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<LINK href="css/mainStyle.css" type=text/css rel=STYLESHEET>
<META content="MSHTML 6.00.2900.2912" name=GENERATOR></HEAD>
<BODY bottomMargin=0 bgColor=#cddcec leftMargin=0 topMargin=0 rightMargin=0
marginheight="0" marginwidth="0"><IMG height=10
src="images/_space.gif"
width=1 border=0><BR>
<TABLE cellSpacing=0 cellPadding=0 width=770 align=center bgColor=#062f68
border=0>
  <TBODY>
  <TR>...........

Can anybody tell me why it is happening.Thanks in advance...
0
Comment
Question by:cstormer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 33

Expert Comment

by:snoyes_jw
ID: 16995107
You probably have some whitespace (a space, new line, anything at all) before that first <?.  Remove it.
0
 

Author Comment

by:cstormer
ID: 16995177
Man that will be too much easy.That wasn't a problem.I also have used ob_start() directive but it wasn't much halp also....So if someone have anyother idea please help....
0
 
LVL 20

Expert Comment

by:Muhammad Wasif
ID: 16995225
Are you using non-english characters in add_subscribers.php?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:cstormer
ID: 16995371
not as I know.But if that's a case what is the solution?
0
 
LVL 4

Expert Comment

by:ale_jrb
ID: 16996437
If you are trying to use any header redirect commands after anything, remove them - it won't work and will result in this error.

For further reading about this error, see here:
http://www.phpfreaks.com/forums/index.php?showtopic=37442
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 16999083
I used ethereal to see the EXACT output ...

HTTP/1.1 200 OK
Connection: close
Proxy-Connection: close
Date: Wed, 28 Jun 2006 07:20:55 GMT
Content-Type: text/html; charset=UTF-8
Server: Apache/2.0.52 (Red Hat)
X-Powered-By: PHP/4.3.9

...<br />
<b>Warning</b>:  session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/versatables.com/admins/testing/campaign_manager/manage_subscribers/add_subscribers.php:1) in <b>/var/www/versatables.com/admins/testing/campaign_manager/manage_subscribers/add_subscribers.php</b> on line <b>2</b><br />
<br />
<b>Warning</b>:  session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/versatables.com/admins/testing/campaign_manager/manage_subscribers/add_subscribers.php:1) in <b>/var/www/versatables.com/admins/testing/campaign_manager/manage_subscribers/add_subscribers.php</b> on line <b>2</b><br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


The ... seems to be the issue.

What is interesting is that this does NOT appear in the view-source.

Can you create the following PHP file.

<?php
session_start();
phpinfo();
?>

Run that and see if you have the same problem.
0
 
LVL 40

Accepted Solution

by:
Richard Quadling earned 2000 total points
ID: 16999125
In looking further into the ethereal output, the characters are not dots but 0xEF 0xBB 0xBF or \357\273\277

Which has lost me!

I wonder if you've somewhere got some sort of compression going on.

I know that if you use zlib compression on the server, you can't use it within PHP also (double compression wouldn't be decoded correctly at the client).

0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 16999969
What was the issue?
0
 
LVL 20

Expert Comment

by:Muhammad Wasif
ID: 17000008
To RQuadling,

What is ethereal?
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 17000124
Easiest way ...

http://www.ethereal.com

"Ethereal® is used by network professionals around the world for troubleshooting, analysis, software and protocol development, and education. It has all of the standard features you would expect in a protocol analyzer, and several features not seen in any other product. Its open source license allows talented experts in the networking community to add enhancements. It runs on all popular computing platforms, including Unix, Linux, and Windows."
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses four methods for overlaying images in a container on a web page
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question