Thứ Tư, 22 tháng 2, 2017
PHP warning session_start() - SOLVED
Description: PHP Warning: session_start(): Cannot send session cache limiter - headers already sent
It's hard to check. So wast much time to debug.
On internet guide is session_start() is the top code+html : YES- this right
BUT: it's really hard debug on big site working.-> waste much time
The simple way is:
1. Create 1 file testsession.php
Add code
<?php
session_start();
error_reporting(E_ALL ^ E_NOTICE);
?>
2. Upload to host
3. Run file testsession.php
Check view error_log at root folder: No error_log, NO waring -> is GOOD status. This mean is OK
4. Check many parts source: this is the important step
Check above HTML
Check head
Check body
....
I found issue so easy.
Good luck
Đăng ký:
Bài đăng (Atom)