This article collects a Summary of the solutions to the error prompt "invalid memory location access" when using php. If you need it, please refer to it.
The newly configured PHP environment or configuration changes have just been made, such as the newly loaded DLL extension and webpage access, may cause "invalid memory location access ." . The main reason is that the DLL extension fails to load.
We need to find the DLL file to load. The troubleshooting method is as follows:
In php. ini
The Code is as follows: |
Copy code |
Display_startup_errors = Off Change Display_startup_errors = On. |
When you access the php page, a php error dialog box will pop up on the server. You can clearly see which dll file fails to be loaded, and sometimes multiple dll files fail to be loaded, you need to annotate php with a semicolon (;) first. ini prompts that the dll will be accessed again and again.
If I open
The Code is as follows: |
Copy code |
Display_startup_errors = On |
Appears
Warning Cannot load module 'sqlite 'because required module 'pdo' is no loaded
The solution is also simple. Because the php_sqlite.dll file is not loaded when it is loaded, the system prompts that the access to the memory location is invalid when running the phpinfo () function. Find the php. ini configuration file and remove it.
The Code is as follows: |
Copy code |
"; Extension = php_pdo.dll" front semicolon, extension = php_sqlite.dll |
After the problematic dll is commented out with a semicolon (;), php can run normally.
If the above method cannot be solved, refer to the following method
Open the php Directory and start debugging ...... It took some time to find the root cause
If you encounter this problem, you can try the following solutions:
Open the php installation directory and edit the php. ini file.
Search for the following fields
The Code is as follows: |
Copy code |
Extension = php_exif.dll |
Add a; semicolon
As follows:
The Code is as follows: |
Copy code |
; Extension = php_exif.dll |
Save and restart iis and access the PHP file again to see if the file is opened and whether the access to the memory location is invalid.