Ahoana ny famahana fampitandremana: session_start(): Tsy afaka mandefa limiter cache session amin'ny WordPress?

Ahoana no hamahanaWordPress出现Warning: session_start(): Cannot send session cache limiter?

Chen Weiliang在本地电脑测试WP主题时,竟出现了这样的PHP警告提示:

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

翻译问题

警告: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

vahaolana

有人表示,因为在session_start(); 语句之前,有其它 html代码存在,但是

不过有些人说他的 session_start(); 之前已经做了。

还有的人说,是没有好设置 session 的保存路径,需修改 php.ini 文件中的:session.save_path = "C:/phpsession"

(后边的路径自己设置,并且要确定存在)

  • php.ini 文件一般应位于系统盘/Windows 目录下面

Linux命令查询PHP配置文件路径

Linux命令查询PHP配置文件 php.ini 文件的存放位置。

shell下执行:

php -v / -name php.ini

na

find / -name php.ini

Ity manaraka ity diaChen Weiliang测试后,最终的解决办法。

  • 修改Linux服务器的 php.ini文件中的: session.auto_start = 0 for session.auto_start = 1

Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) 分享的《WordPress出现Warning: session_start(): Cannot send session cache limiter如何解决?》,对您有帮助。

Tongasoa eto mizara ny rohy amin'ity lahatsoratra ity:https://www.chenweiliang.com/cwl-568.html

Tongasoa eto amin'ny fantsona Telegram an'ny bilaogin'i Chen Weiliang hahazoana vaovao farany!

🔔 Aoka ho voalohany hahazo ny "ChatGPT Content Marketing AI Tool Usage Guide" sarobidy ao amin'ny lahatahiry ambony fantsona! 🌟
📚 Ity torolalana ity dia misy sanda lehibe, 🌟Ity dia fotoana tsy fahita firy, aza adino! ⏰⌛💨
Partageo ary j'aime raha tianao!
Ny fizaranao sy ny j'aime no antony manosika anay hatrany!

 

Comments

Ny adiresy mailakao dia tsy havoaka. Ampiasaina ny saha ilaina * Label

horonana mankany ambony