error warning ini_get ("session.use_cookies")

0

I'm working with sessions and in the login page of my application I put the following code: $_SESSION = array();

if (ini_get("session.use_cookies")) 
{
    $params = session_get_cookie_params();
    setcookie(session_name(), '', time() - 42000,$params["path"], $params["domain"],$params["secure"], $params["httponly"]);
}'

This is giving me a warning error: Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/folhapgto/login.php:5) in /var/www/html/folhapgto/login.php

So I understand the page header is not accepting me to check if there is any open session? grateful

asked by anonymous 08.02.2018 / 17:50

0 answers