简体   繁体   English

Azure-已加载后,“ PHP警告:session_start():找不到保存处理程序'wincache'”

[英]Azure - “PHP Warning: session_start(): Cannot find save handler 'wincache'” after already being loaded

I've got a webjob running on my Azure app service that starts off with the session_start(); 我在Azure应用程序服务上运行了一个webjob,该webjob以session_start(); command. 命令。

At first - I was getting this error: 一开始-我遇到了这个错误:

PHP Warning: session_start(): Cannot find save handler 'wincache' - session startup failed in D:\\local\\Temp\\jobs\\triggered\\myCron\\a4ypumbv.4i2\\MyCron\\myCron.php on line 3 PHP警告:session_start():找不到保存处理程序'wincache'-会话启动在第3行的D:\\ local \\ Temp \\ jobs \\ triggered \\ myCron \\ a4ypumbv.4i2 \\ MyCron \\ myCron.php中失败

What I ended up doing was going to my App Service -> Application Settings, and I set a custom setting of PHP_INI_SCAN_DIR set to D:\\home\\site , like so: 我最终要做的是转到我的应用程序服务->应用程序设置,然后将PHP_INI_SCAN_DIR的自定义设置设置为D:\\home\\site ,如下所示:

PHP_INI_SCAN_DIR设置为主目录

Then, inside the D:\\home\\site directory, I uploaded a file titled phpconfig.ini , and inside I placed this: 然后,在D:\\home\\site目录中,我上传了一个名为phpconfig.ini的文件,并将其放置在其中:

extension=D:\home\site\ext\php_wincache.dll

I went to https://www.iis.net/downloads/microsoft/wincache-extension and downloaded the appropriate WinCache version - WinCache 1.3 for PHP 5.6 from SourceForge. 我转到https://www.iis.net/downloads/microsoft/wincache-extension,并从SourceForge下载了相应的WinCache版本- WinCache 1.3 for PHP 5.6 After unpacking the .exe file, I copied the php_wincache.dll file into my D:\\home\\site\\ext folder. 解压缩.exe文件后,我将php_wincache.dll文件复制到了D:\\home\\site\\ext文件夹中。

Now, when I run the webjob, I get this same error but also another error message right before it saying the wincache file was already loaded: 现在,当我运行webjob时,我得到了相同的错误,但是在显示wincache文件已经加载之前,又出现了另一条错误消息:

PHP Warning: Module 'wincache' already loaded in Unknown on line 0 PHP警告:模块'wincache'已在第0行的Unknown中加载

PHP Warning: session_start(): Cannot find save handler 'wincache' - session startup failed in D:\\local\\Temp\\jobs\\triggered\\myCron\\a4ypumbv.4i2\\MyCron\\myCron.php on line 3 PHP警告:session_start():找不到保存处理程序'wincache'-会话启动在第3行的D:\\ local \\ Temp \\ jobs \\ triggered \\ myCron \\ a4ypumbv.4i2 \\ MyCron \\ myCron.php中失败

How can I make these warnings go away completely? 如何使这些警告完全消失? Has anyone run into the same problem before? 有人遇到过同样的问题吗?

wincache has been already installed and enabled in Azure App Service. 已在Azure App Service中安装并启用wincache

In this case, you no longer need to call session_start() manually, Azure would start sessions on each page automatically. 在这种情况下,您不再需要手动调用session_start() ,Azure会自动在每个页面上启动会话。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Azure PHP中找不到保存处理程序WinCache- - Cannot find save handler wincache - in Azure PHP 警告:session_start():找不到保存处理程序“redis” - Warning: session_start(): Cannot find save handler 'redis' 警告:session_start():找不到保存处理程序-会话启动失败 - Warning : session_start(): Cannot find save handler 's' - session startup failed 警告:session_start():找不到保存处理程序'/home1/proctekw/tmp; 用于存储/检索数据的处理程序' - session 启动失败 - Warning: session_start(): Cannot find save handler '/home1/proctekw/tmp ; handler used to store/retrieve data' - session startup failed PHP 警告:session_start():标头已发送时无法启动会话 - PHP Warning: session_start(): Cannot start session when headers already sent Yii2 - session_start(): 找不到保存处理程序'memcached' - 会话启动失败 - Yii2 - session_start(): Cannot find save handler 'memcached' - session startup failed PHP警告:session_start():无法发送会话缓存限制器-标头已发送 - PHP Warning: session_start(): Cannot send session cache limiter - headers already sent PHP Session_start警告 - PHP Session_start Warning PHP 中的 Session_start 警告 - Session_start warning in PHP 为什么我得到session_start():找不到保存处理程序'memcached'-会话在Google App Engine上启动失败? - Why am I getting session_start(): Cannot find save handler 'memcached' - session startup failed on google app engine?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM