Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 641589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:04:45+00:00 2026-05-13T21:04:45+00:00

I get this: Warning: session_start(): Cannot send session cookie – headers already sent by

  • 0

I get this:

Warning: session_start(): Cannot send
session cookie – headers already sent
by (output started at
/www/zxq.net/w/e/e/weedcl/htdocs/index.php:3)
in
/www/zxq.net/w/e/e/weedcl/htdocs/common.php
on line 2 Warning: session_start():
Cannot send session cache limiter –
headers already sent (output started
at
/www/zxq.net/w/e/e/weedcl/htdocs/index.php:3)
in
/www/zxq.net/w/e/e/weedcl/htdocs/common.php
on line 2 Warning: Cannot modify
header information – headers already
sent by (output started at
/www/zxq.net/w/e/e/weedcl/htdocs/index.php:3)
in
/www/zxq.net/w/e/e/weedcl/htdocs/common.php
on line 3 Warning: Cannot modify
header information – headers already
sent by (output started at
/www/zxq.net/w/e/e/weedcl/htdocs/index.php:3)
in
/www/zxq.net/w/e/e/weedcl/htdocs/common.php
on line 12

Its weird because everything works fine in localhost

common.php:

<?php
session_start();
header('Cache-control: private'); // IE 6 FIX

if(isSet($_GET['lang']))
{
$lang = $_GET['lang'];

// register the session and set the cookie
$_SESSION['lang'] = $lang;

setcookie("lang", $lang, time() + (3600 * 24 * 30));
}
else if(isSet($_SESSION['lang']))
{

index.php:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php
include_once 'common.php';
?>
<html>
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
 <title>New Project</title>
 <link rel="stylesheet" type="text/css" href="styles/global.css" />
 <link rel="stylesheet" type="text/css" href="styles/slimbox2.css" />
 <script type="text/javascript" src="scripts/jquery-1.3.2.min.js"></script>
 <script type="text/javascript" src="scripts/jquery.corner.js"></script>
 <script type="text/javascript" src="scripts/jquery.validate.js"></script>
 <script type="text/javascript" src="scripts/custom.js"></script>
 <script type="text/javascript" src="scripts/slimbox2.js"></script>
</head>
<body id="home">
<div id="header">
 <div class="container">
  <div id="header-top">
   <h1><a href="http://widerdesign.co.nr/">wider design</a></h1>
   <ul id="lang">
    <li><a href="index.php?lang=en" <?php if($lang=='en') {echo 'class="current"';} ?>>English</a></li>
    <li><a href="index.php?lang=es" <?php if($lang=='es') {echo 'class="current"';} ?>>Español</a></li>
    <li><a href="index.php?lang=tw" <?php if($lang=='tw') {echo 'class="current"';} ?>>中文(繁體)</a></li>
    <li><a href="index.php?lang=cn" <?php if($lang=='cn') {echo 'class="current"';} ?>>中文(简体)</a></li>
   </ul>
  </div>
  <div id="header-bottom">
   <div id="tagline">
    <h2>Nulla vitae tortor mauris. Fusce dapibus ultrices nibh id dignissim.<strong>Phasellus eget nibh ac quam rutrum mollis</strong> at vitae nisl.</h2>
    <p>Pellentesque faucibus est eu tellus varius in suscipit augue dapibus. In turpis ligula, faucibus eu mollis non, tincidunt ac magna. Integer tempor laoreet lacus, non accumsan ligula eleifend a. Nulla vitae tortor mauris. Fusce dapibus ultrices nibh id dignissim. Phasellus eget nibh ac quam rutrum mollis at vitae nisl. Morbi ultricies tristique tortor sed elementum. Vivamus id neque et lectus commodo tempor.</p>
   </div>
   <div id="about">
    <h2><?php echo $lang['h1']; ?></h2>
    <p>Pellentesque faucibus est eu tellus varius in suscipit augue dapibus. In turpis ligula, faucibus eu mollis non, tincidunt ac magna. Integer tempor laoreet lacus, non accumsan ligula eleifend a. Nulla vitae tortor mauris. Fusce dapibus ultrices nibh id dignissim. Phasellus eget nibh ac quam rutrum mollis at vitae nisl. Morbi ultricies tristique tortor sed elementum. Vivamus id neque et lectus commodo tempor. Integer tincidunt, nunc ac hendrerit vestibulum, orci nisl commodo odio, a tempus leo libero nec sapien. Praesent a urna non diam mollis tristique.</p>
   </div>
  </div><!-- #header-bottom -->
 </div><!-- .container -->
</div><!-- #header -->
<div id="work">
 <div class="container">
  <div class="project">
   <div class="left">
    <h2>Royal Steel</h2>
    <p>Royal Steel Plastic Technology Industrial Co., Ltd., manufactures the dominant PET Plastic Recycling and Extrusion Equipment in the Industry. Since 1980, over 29 years experience in plastic recycling technology.</p>
    <ul>
     <li><a href="index.html">View site</a></a></li>
     <li><a href="index.html">Visit site</a></li>
    </ul>
   </div>
   <div class="right">
    <a href="images/project1.jpg" rel="lightbox"><img src="images/project1.jpg"/></a>
   </div>
  </div><!-- .project -->
  <div class="project">
   <div class="left">
    <h2>Best Language School</h2>
    <p>Best Language school in Taiwan by provides personal service that exceeds expectations and by helping our students to achieve personal excellence.</p>
    <ul>
     <li><a href="index.html">View site</a></a></li>
     <li><a href="index.html">Visit site</a></li>
    </ul>
   </div>
   <div class="right">
    <a href="#"><img src="images/project2.jpg"/></a>
   </div>
  </div><!-- .project -->
  <div class="project">
   <div class="left">
    <h2>Best Language School</h2>
    <p>Best Language school in Taiwan by provides personal service that exceeds expectations and by helping our students to achieve personal excellence.</p>
    <ul>
     <li><a href="index.html">View site</a></a></li>
     <li><a href="index.html">Visit site</a></li>
    </ul>
   </div>
   <div class="right">
    <a href="#"><img src="images/project3.jpg"/></a>
   </div>
  </div><!-- .project -->
  <div class="project">
   <div class="left">
    <h2>Best Language School</h2>
    <p>Best Language school in Taiwan by provides personal service that exceeds expectations and by helping our students to achieve personal excellence.</p>
    <ul>
     <li><a href="index.html">View site</a></a></li>
     <li><a href="index.html">Visit site</a></li>
    </ul>
   </div>
   <div class="right">
    <a href="#"><img src="images/project4.jpg"/></a>
   </div>
  </div><!-- .project -->
 </div><!-- .container -->
</div><!-- #work -->
<div id="footer">
 <div class="container">
  <div id="footer-top">
   <div id="contact">
    <h2>Get in Touch</h2>
    <p>Please use the following contact form to send me a message.</p>
    <form id="sendmail" method="post" action="http://www.emailmeform.com/fid.php?formid=254816">
     <label for="name"><strong>Your Name</strong></label>
     <input type="text"  id="name" name="FieldData0" />
     <label for="email"><strong>Your Email</strong></label>
     <input type="text"  id="email" name="FieldData1" />
     <label for="message"><strong>Your Message</strong></label>
     <textarea type="text" id="message" name="FieldData2"></textarea>
     <input id="button" type="submit" value="Send">
    </form>
   </div>
   <div id="tools">
    <h2>I use</h2>
    <ul>
     <li><a href="index.php">Vim</a></li>
     <li><a href="index.php">Firefox</a></li>
     <li><a href="index.php">Firebug</a></li>
     <li><a href="index.php">jQuery</a></li>
     <li><a href="index.php">Zymic</a></li>
     <li><a href="index.php">Email Me Form</a></li>
    </ul>
   </div>
   <div id="info">
    <h2>Contact Details</h2>
    <ul>
     <li><strong>Address:</strong> Kuo Kuang Rd., Taichung 402, Taiwan R.O.C.</li>
     <li><strong>Tel:</strong> 0918051170</li>
     <li><strong>Email:</strong> <a href="mailto:janoochen@gmail.com">janoochen@gmail.com</a></li>
    </ul>
   </div>
  </div><!-- #footer-top -->
  <div id="footer-bottom">
   <p>Copyright © 2009 New Project. All Rights Reserved.</p>
  </div>
 </div><!-- .container -->
</div><!-- #footer -->
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T21:04:46+00:00Added an answer on May 13, 2026 at 9:04 pm

    The error says it all:

    headers already sent (output started at ..../index.php:3)
    

    You can’t send headers after the body output has started.
    It works on your home machine because either warnings are suppressed, or you have different output buffer settings.

    Use

    <?php
    include_once 'common.php';
    ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 421k
  • Answers 421k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I am assuming you are trying to use the Avalon… May 15, 2026 at 10:55 am
  • Editorial Team
    Editorial Team added an answer http://pecl.php.net/package/operator see this as well: http://webreflection.blogspot.com/2008/06/from-future-php-javascript-like-number.html May 15, 2026 at 10:55 am
  • Editorial Team
    Editorial Team added an answer Another possible solution: SELECT T1.vDir, T1.iNumber AS iLowNumber, T2.iNumber AS… May 15, 2026 at 10:55 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.