Home > Backend Development > PHP Tutorial > PHP page is blank and mysql cannot be loaded. Solution_PHP tutorial

PHP page is blank and mysql cannot be loaded. Solution_PHP tutorial

WBOY
Release: 2016-07-21 14:55:05
Original
958 people have browsed it

Being monitored by the website in my sleep (click here to enter many websites that provide free website monitoring. I use one from abroad. It monitors once every minute and provides real-time reminders to avoid the website hanging up for a long time.) Text messages to Noisy When I woke up, the website could not be opened normally, so I had no choice but to get up.

All websites prompt Service Unavailable. Looking at the logs, I found that there is an error in loading the 7i24 anti-hotlink file. I will not check the cause first. I will uninstall it first. After uninstalling, the static page is normal, but the PHP page is not working. All pages are blank. Restart IIS. , mysql all failed. I wrote a simple php page to test php and found that it was normal. It seemed that I could not connect to mysql. I searched online for solutions and found the following methods:

 1. extension_dir = is inconsistent with the actual ext directory of PHP.

 2. The PHP directory and ext directory are not added to the environment variables.

3. The comments before extension=php_mysql.dll and so on have not been removed.

4. The Zend installation directory is inconsistent with the directory specified by Zend in php.ini.

5. Copy libmySQL.dll to: c:windowssystem32. Then restart IIS

It’s dizzying to see. I’ve tried them all, but they still don’t work. Then restart the server, nope. Reinstalling php mysql still doesn't work, and it's a bit broken. But it can't crash, so I have to continue to check. I found an article that mentioned Loaded Configuration File C:WINDOWSphp.ini in phpinfo(). That article mentioned that it was a problem with php.ini, but I couldn't think of it as a problem with php. ini, because I have already restored it before. However, I opened the phpinfo() page () and saw Loaded Configuration File (none). Obviously it was not loaded into php.ini at all. At this time, I thought of permissions and quickly added users read permission to it (if that didn't work, I could add it again. Add guests), restart iis, and it's ok.

So in addition to the above 5 items, you can add a 6th item:

6. Check the permissions of php.ini and give its users (guests) read, read and run permissions.

Environment: win2003, iis

Please indicate the source when reprinting original articles: http://www.maxin.cn/archives/2010/282.html

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/364485.htmlTechArticleBeing monitored by websites while sleeping (click here to enter). There are many websites that provide free website monitoring. I am using one from abroad. , monitor once every minute, and provide real-time reminders to prevent the website from hanging down for a long time...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template