Home >Backend Development >PHP Tutorial >How to solve the problem of Cannot send session cache limiter in PHP_PHP Tutorial
Today, when using PHP session, I encountered a problem that I had encountered before but could not solve. The following prompt appeared on the page:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at E:phpcodeadmin.php:1) in E:phpcodelogolistadminlogo.php on line 2
I searched online and some people said it is because there is a statement before session_start(); Other html codes, but my session_start(); is already in progress.
Some say it’s because the session save path is not set, so you need to modify session.save_path = "C:/phpsession" in php.ini [Set the following path yourself, and make sure it exists. The php.ini file should generally be located under the system disk/Windows directory]
But I still get this prompt after making the above settings. After repeated testing, the problem was finally solved.
Solution:
Modify session.auto_start = 0 in php.ini to session.auto_start = 1