欢迎您来到,李雷博客 | PHP博客        登录  |  注册

Apache错误日志VirtualProtect() failed [87] 参数错误

更新:2022-04-17 09:58:38
人气:850
来源:本站原创
A+

最近一直在更新李雷博客的后台,发现Apache错误日志(error.log)中出现VirtualProtect() failed [87] 参数错误的提示信息。或者是“"VirtualProtect() failed [87] The parameter is incorrect"”但并不影响程序的运行,可一直这样放着心里总是不舒服,干脆花点儿时间解决它。

VirtualProtect() failed [87] 参数错误

出现上述问题是因为开启了PHP的opcache缓存,知道问题的所在就好下手解决,方法有两种,其一是关闭opcache缓存

[opcache]
zend_extension=php_opcache.dll
; Determines if Zend OPCache is enabled
opcache.enable=1
以上是开启了缓存,关闭即可,如下注释掉就行了。
[opcache]
; zend_extension=php_opcache.dll
; Determines if Zend OPCache is enabled
; opcache.enable=1

如果不想关闭opcache还有一个方法,这个方法是在官网论坛中别人找到的,办法就是在PHP.ini文件中[opcache]的最后增加下面的代码:

; Absolute path used to store shared lockfiles (for *nix only).
;opcache.lockfile_path=/tmp
opcache.jit=off //添加的是这行,其它只为了方便大家查看,不用理会
[curl]

经过一番折腾,解决后再次重启apache服务,任意访问李雷博客页面的链接,回过头再去看error.log中的记录,再也没有出现VirtualProtect() failed [87] 参数错误的信息。至此,问题解决。

Apache错误日志(error.log)

另有一段记录在这里,用于参考,与PHP8.1有关,也是摘自PHP官网论坛。

I came from upgrading a PHP7 installation on Windows tzo PHP8.1
Because of dependencies in the Apace installation I have to use the x32 Version of apache and PHP.
But the problem says the same.
Hundreds of enties in error.log
"VirtualProtect() failed [87] The parameter is incorrect"
推荐的文章
# 发表我的评论
  /     /  
# 最近评论
暂时还没有评论,要不要说点什么?
  Ads by Google
  联系博主
Hello,本博客系统采用PHP和MySql开发,程序开发完全是因为个人爱好,是自己纯手写PHP源代码,未采用任何PHP框架!
QQ:858353007   微信号:lileihot123
网站地图
会员服务
关于我们
QQ:858353007
 
广告服务
加我微信
移动端访问
 
 
Copyright © 2014- 2023 www.mdaima.com All Rights Reserved.
李雷博客,专注PHP经验、PHP教程及PHP源代码开源下载分享的PHP博客!   ICP备案号:京ICP备10202169号-4