Jump to content

Porque que me da este erro?


Johny
 Share

Recommended Posts

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/

Warning: Cannot modify header information - headers already sent by (output started at /home/

Gostava de saber o porque de me dar estes erros?

#############

Link to comment
Share on other sites

Qual é a maneira correcta?

<?php
defined('_VALID_REQUIRE') or die ('Direct access not allowed.');
require_once("includes/ban.php");

session_start(); ob_start();
if (isset($_SESSION["login_user"]) AND isset($_SESSION["senha_user"])) {
    $login_usuario = $_SESSION["login_user"];
    $senha_usuario = $_SESSION["senha_user"];

require_once("includes/ligacao.php");
?>

ou

 <?php
    session_start();
    ob_start();
defined('_VALID_REQUIRE') or die ('Direct access not allowed.');
require_once("includes/ban.php");

if (isset($_SESSION["login_user"]) AND isset($_SESSION["senha_user"])) {
    $login_usuario = $_SESSION["login_user"];
    $senha_usuario = $_SESSION["senha_user"];

require_once("includes/ligacao.php");
?>

Porque tanto numa como outra dá o erro Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /.....

Se me poderem ajudar agradecia =)

#############

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. 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.