Cyfeiriadur Erthygl
Sut i ddatrys y gwall WordPress "Rhybudd: session_start(): Ni ellir anfon cyfyngwr storfa sesiwn"?
Pan oedd Chen Weiliang yn profi thema WP ar ei gyfrifiadur lleol, daeth ar draws y rhybudd PHP canlynol:
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
problem cyfieithu
警告: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
Datrysiad
Mae rhai pobl yn dweud hynny oherwyddsession_start(); datganiad, cod html arall yn bodoli, ond
Ond mae rhai pobl yn dweud bod ei session_start(); Mae wedi ei wneud o'r blaen.
Mae rhai pobl yn dweud nad yw'n hawdd gosod llwybr arbed y sesiwn, ac mae angen addasu'r ffeil php.ini:session.save_path = "C:/phpsession"
(Mae'r llwybr y tu ôl wedi'i osod gennych chi'ch hun, a gwnewch yn siŵr ei fod yn bodoli)
- Yn gyffredinol, dylai'r ffeil php.ini gael ei lleoli o dan y disg system / cyfeiriadur Windows
LinuxGorchymyn i ymholi llwybr ffeil ffurfweddu PHP
Mae'r gorchymyn Linux yn holi lleoliad storio ffeil ffurfweddu PHP ffeil php.ini.
Gweithredu o dan y gragen:
php -v / -name php.ini
neu
find / -name php.ini
Dyma'r ateb terfynol a ganfu Chen Weiliang ar ôl profi.
- Addasu ffeil php.ini y gweinydd Linux:
session.auto_start = 0为session.auto_start = 1
Gobeithio y bydd yr erthygl "Sut i ddatrys y gwall WordPress 'Rhybudd: session_start(): Ni ellir anfon cyfyngwr storfa sesiwn'?" a rennir ar flog Chen Weiliang ( https://www.chenweiliang.com/ ) o gymorth i chi.
Mae croeso i chi rannu'r ddolen erthygl hon: https://www.chenweiliang.com/cwl-568.html
