Article directory
How to solveWordPressWarning: session_start(): Cannot send session cache limiter appears?
Chen WeiliangWhen testing the WP theme on a local computer, this PHP warning message appeared:
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at D:\xampp\htdocs\wp\ceshimuban\wp-content\plugins\wordpress-seo\frontend\class-json-ld.php:121) in D:\xampp\htdocs\wp\ceshimuban\wp-content\plugins\ad-inserter\class.php(360) : eval()'d code on line 14
translation problem
警告:session_start():无法发送会话缓存限制器 - 已发送的头文件(输出开始于D:\ xampp \ htdocs \ wp \ ceshimuban \ wp-content \ plugins \ wordpress-seo \ frontend \ class-json-ld.php: (360):eval()在第14行的d代码(第121行)在D:\ xampp \ htdocs \ wp \ ceshimuban \ wp-content \ plugins \ ad-inserter \ class.php
Solution
Some people say that becausesession_start();
statement, other html code exists, but
But some people say that his session_start();
It has been done before.
Some people say that it is not good to set the save path of the session, and it is necessary to modify the php.ini file:session.save_path = "C:/phpsession"
(The path behind is set by yourself, and make sure it exists)
- The php.ini file should generally be located under the system disk/Windows directory
LinuxCommand to query PHP configuration file path
The Linux command queries the storage location of the PHP configuration file php.ini file.
Execute under the shell:
php -v / -name php.ini
Or
find / -name php.ini
The following isChen WeiliangAfter testing, the final solution.
- Modify the php.ini file of the Linux server:
session.auto_start = 0
forsession.auto_start = 1
Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "How to solve Warning: session_start(): Cannot send session cache limiter in WordPress? , to help you.
Welcome to share the link of this article:https://www.chenweiliang.com/cwl-568.html
Welcome to the Telegram channel of Chen Weiliang's blog to get the latest updates!
📚 This guide contains huge value, 🌟This is a rare opportunity, don’t miss it! ⏰⌛💨
Share and like if you like!
Your sharing and likes are our continuous motivation!