search
Homephp教程php手册php提示 内存位置访问无效

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

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

display_startup_errors = Off 改为 display_startup_errors = On 。

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

display_startup_errors = On 出现

Warning  Cannot load module 'SQLite' because required module 'pdo' is no loaded

解决办法也很简单了,因为加载php_sqlite.dll时未加载到php_pdo.dll文件,所以运行phpinfo()函数时提示内存 位置访问无效。找到php.ini配置文件,然后去掉";extension=php_pdo.dll"前面的分号, extension=php_sqlite.dll

把出问题的dll都用分号(;)注释掉后,php就可以正常运行了,如果上面方法无法解决,可参考下面方法:

打开php目录开始调试……花了一点时间总算找到了根源,如果你也碰到这个问题那么你也来试一下以下我的解决方案:

打开php的安装目录编辑php.ini这个文件,搜索下面的字段

extension=php_exif.dll,找到后在前面加一个;分号,如下:

;extension=php_exif.dll,保存重启iis再访问一下php文件看看能否打开了 是否没有出现内存位置访问无效了


文章网址:

随意转载^^但请附上教程地址。

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.