Home >Backend Development >PHP Tutorial >PHP prompt: Memory location access is invalid. Solution summary_PHP tutorial

PHP prompt: Memory location access is invalid. Solution summary_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:56:131050browse

This article collects a summary of solutions to the error message PHP "Invalid memory location access" when using PHP. Friends in need can refer to it.

In a newly configured PHP environment, or a configuration change has just been made, such as a newly loaded DLL extension, when accessing the page, the error "Invalid memory location access." may occur. The main reason is that the DLL extension failed to load.

We need to find out which DLL file has a problem loading. The troubleshooting method is:

Insert php.ini

Search the fields below
The code is as follows
 代码如下 复制代码

display_startup_errors = Off
改为

display_startup_errors = On 。

Copy code

display_startup_errors = Off

Change to
 代码如下 复制代码
display_startup_errors = On

display_startup_errors = On .


When you visit the php page, a php error prompt dialog box will pop up on the server. You can clearly see which dll file failed to load. Sometimes multiple dll files failed to load. You need to semicolon ( ;) Comment out the dll prompted in php.ini and continue accessing it to check repeatedly.

 代码如下 复制代码
”;extension=php_pdo.dll”前面的分号, extension=php_sqlite.dll
If I open it


appears

Warning Cannot load module ‘SQLite’ because required module ‘pdo’ is no loaded

The solution is also very simple. Because the php_pdo.dll file is not loaded when loading php_sqlite.dll, the memory location access is invalid when running the phpinfo() function. Find the php.ini configuration file and remove

After commenting out the problematic DLLs with semicolons (;), PHP can run normally.

If the above method cannot solve the problem, you can refer to the following method
 代码如下 复制代码

extension=php_exif.dll

Open the php directory and start debugging...it took me a while to finally find the root cause

If you also encounter this problem, then you can also try my solution below:
 代码如下 复制代码

;extension=php_exif.dll

Open the php installation directory and edit the php.ini file

The code is as follows
Copy code extension=php_exif.dll After finding it, add a; semicolon in front is as follows:
The code is as follows Copy code
;extension=php_exif.dll Save and restart iis and then access the php file to see if it can be opened. Is there no invalid memory location access?

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632179.htmlTechArticleThis article collects a summary of solutions to the error message PHP "Invalid memory location access" when using php. Friends in need can refer to it. Newly configured PHP environment, or just...
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