People who use IIS + PhP often have headaches and often encounter PHP has encountered an access violation.
It does not always appear, but occasionally. For this situation, I have searched the internet, and none of them can be completely solved. There are two solutions available. Note that both methods should be used together.
1. Added PHP extensions in "Web Service extension" and "website"-> "property"-> "ISAPI filter" in IIS
2. the mysql version does not match. Copy libmysql. dll in the MySQL installation directory to the PHP installation directory or C:/Windows/system32.
How can I check that the version does not match? First, log on to phpMyAdmin and you can see that MySQL 5.0.19-nt is executed as root @ localhost on localhost.
It indicates that the current mysql version is 5.0.19, and then phpinfo () is run. You can get the mysql version used by PHP. If the client API version is 5.0.19, it indicates no problem, if not, it must be replaced.