Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Sign Up

PHP Warning: Cannot modify header information - headers already sent by (output started at php://input:1) in /var/www/html/site.name/system/framework.php on line 112


Recommended Posts

Всем здрасте!

Кто подскажет куда копать. Стоят три контейнера    

opencart_php

adminer

mysql:5.7

 

В админке есть ошибка 

 

PHP Warning:  Cannot modify header information - headers already sent by (output started at php://input:1) in /var/www/html/site.name/system/framework.php on line 112

 

сама строчка на которую указывает ошибка

if ($config->get('session_autostart')) {
	/*
	We are adding the session cookie outside of the session class as I believe
	PHP messed up in a big way handling sessions. Why in the hell is it so hard to
	have more than one concurrent session using cookies!

	Is it not better to have multiple cookies when accessing parts of the system
	that requires different cookie sessions for security reasons.

	Also cookies can be accessed via the URL parameters. So why force only one cookie
	for all sessions!
	*/

	if (isset($_COOKIE[$config->get('session_name')])) {
		$session_id = $_COOKIE[$config->get('session_name')];
	} else {
		$session_id = '';
	}

	$session->start($session_id);
// строчка ниже как раз 112
    setcookie($config->get('session_name'), $session->getId(), (ini_get('session.cookie_lifetime') ? (time() + ini_get('session.cookie_lifetime')) : 0), ini_get('session.cookie_path'), ini_get('session.cookie_domain'));
}

 

Всё бы ничего но при дальнейшей работе возникают похожие ошибки, которые ведут на другие файлы, с похожей строчкой setcookie()

Может кто сталкивался, буду признателен за помощь!

 

Edited by oberonalpha
Link to comment
Share on other sites


При использовании Cookies необходимо иметь в виду, что Cookies должны устанавливаться до первого вывода информации в браузер.

Возможно, еще до обозначенной Вами строки, есть попытка что-то вывести на экран или же есть уведомление об ошибке.

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

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.