This question has already been answered:
- Data is not saved in $ _SESSION 2 responses
Hello, the problem with the PHP session:
Warning: session_start (): Cannot send session cookie - headers sent by (output started by C: \ Winginx \ home \ wc.loc \ public_html \ admin \ index.php: 1) in C: \ Winginx \ home \ wc. loc \ public_html \ protect.php on line 2 Warning: session_start (): Cannot send session cache limiter - headers already sent (output started by C: \ Winginx \ home \ wc.loc \ public_html \ admin \ index.php: 1) in C: \ Winginx \ home \ wc.loc \ public_html \ protect.php on line 2 Warning: Cannot modify header information - headers already sent by (output started by C: \ Winginx \ home \ wc.loc \ public_html \ admin \ index.php: 1) in C: \ Winginx \ home \ wc.loc \ public_html \ protect.php on line 3
UTF-8 encoding without BOM costs, there is nothing before the start of the session. Here is the beginning of the index.php code itself:
<?php require_once('../protect.php'); require_once('../database.php'); $sql_connection = dbConnect(); The protect.php file (also UTF-8 without BOM), it has the beginning:
session_start(); header("Content-Type: text/html; charset=utf-8"); require_once('database.php'); Moreover, this project was done for a long time, and then everything worked, and the hosting also worked without problems.
PHP version: 5.3.27.
<?php- probably BOM before it is tutankhamun