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"”但并不影响程序的运行,可一直这样放着心里总是不舒服,干脆花点儿时间解决它。
出现上述问题是因为开启了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] 参数错误的信息。至此,问题解决。
另有一段记录在这里,用于参考,与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"
推荐的文章
随手记
PHP经验分享
- ● mysql错误:Foundoptionwithoutprecedinggroupinconfigfile
- ● PHP如何从一个数组数据列表中随机取其中的数值?
- ● PHP获取用户访问IP地址的5种方法
- ● PHP用imagerotate旋转图片和等比缩放压缩、添加水印
- ● php怎么把时间转成数字
- ● 利用PHPflush函数在运行过程中直接打印输出结果
- ● php与JavaScript的正则表达式使用方法是否一样?
- ● PHP中preg_match()和preg_match_all()正则表达式的用法区别
- ● PHP批量向百度主动推送URL加快收录的示例代码
- ● 使用PHP中3个神奇常量快速获取目录、文件名和行号