Install and configure the PHP and Apache servers in Windows XP, but when you restart the Apache server, the system prompts "httpd error-the memory cannot be read ". I searched the internet for a few solutions. One of the more reliable ones is that if PHP is installed by MSI, several lib dll will be missing, so the problem of changing to a compressed package will be solved.
However, this method does not work for me. No matter whether it is copying the missing DLL, changing the zip package again, or even using appserv, the same error occurs.
The solution was to delete php5ts. dll in system32. The result is all normal.
This php5ts. dll is stored when I reference a PHP self-taught manual to configure PHP. The book says that the relevant DLL under the PHP Directory is copied to system32, so cloud ...... I didn't expect this to happen.
Someone found this article on the Internet:
The php5ts. dll file is a PHP kernel dynamic link library file. Without this file, the PHP parser cannot be used.
Therefore, when Apache loads PHP in windows, Apache not only needs to load the Apache module of PHP
Loadmodule
Php5_module "path/to/php5apache2_2.dll"
Specifies the type of file to be parsed using the PHP parser
Addtype application/X-httpd-PHP. php
It is important to copy the php5ts. dll file to a searchable system directory.
, That is, Windows environment variables such as C;/Windows/system32.
In addition, the php5ts. dll file is required when PHP supports MySQL.
The libmysql. dll file must be copied to the searchable path.
I have installed appserv and system32 does not have php5ts. dll, but the user path contains the PHP Directory, so it can run normally.