Home  >  Article  >  php教程  >  PHP“内存位置访问无效”

PHP“内存位置访问无效”

WBOY
WBOYOriginal
2016-06-13 10:43:46793browse

新配置的PHP环境,或者刚做过配置改动,比如新加载的DLL扩展,访问页面,可能会出现“内存位置访问无效。”的错误。主要原因是DLL扩展加载失败。

我们就需要找到是哪一个DLL文件加载出现了问题。排查方法是:

将php.ini中 display_startup_errors = Off 改为display_startup_errors = On 。

这时访问php页面,服务器上会弹出php错误的提示对话框,你就可以明确看到是哪一个dll文件加载失败,有时会有多个dll文件加载失败,需要你先分号(;)注释掉php.ini中提示那个dll后继续访问如此反复排查。

把出问题的dll都用分号(;)注释掉后,php就可以正常运行了。

上面是网上搜的方法,原理是对的,但是具体到我遇到的问题,不用那么麻烦,把IIS先暂停下,结束w3wp.exe进程,删除原来加载中的dll,重新添加新的dll,然后重新启动IIS即可以.

 from:末日blog

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php调用CKEditor编辑器Next article:浅谈PHP实现伪静态