I have probelm with COOKIE.
Error:
Cannot modify header information - headers already sent by (output started at /data/web/virtuals/9784/virtual/www/subdom/roids/_libs/_lib.php:1) in /data/web/virtuals/9784/virtual/www/subdom/roids/_libs/_lib.php on line 43
Index:
<?php
session_start();
error_reporting(E_ALL);
require_once('_libs/_console.php');
require_once('_libs/class.phpmailer.php');
require_once('_libs/_lib.php');
//require_once('_libs/PasswordLib.phar');
$db = new database();
$func = new functions($db);
$cms = new CMS_system($func, $db);
$func->setLang();
The file _lib.php starts with <?php
and there is no whitespace at the start. That file contains classes and functions.
Function setlang:
public function setLang() {
setcookie("lang", "sk", time()+60*60*24*30);
if (isset($_POST['lang'])) {
setcookie("lang", $_POST['lang'], time()+60*60*24*30);
}
}
I tried deleting session_start from script but that does not work. Thanks for any comments or solutions