Home >Backend Development >PHP Tutorial >PHP prompt: Memory location access is invalid. Solution summary_PHP tutorial
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
The code is as follows
|
Copy code
|
||||||||||||||||
display_startup_errors = Off Change to
display_startup_errors = On .
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
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:
Open the php installation directory and edit the php.ini file | Search the fields below
The code 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? |