PHP5 has always been bug!

xiaoxiao2021-03-06  105

PHP5 has added a lot of new properties, and it is not added here. I just observed a phenomenon on a PHP5 on a Windows operating system (especially 2000,2003):

When the default installation, configuration, when 100 users read a large PHP file, you will find an irregular start message in the error.log file:

[NOT AUG 25 17:59:15 2004] [NOTICE] APACHE / 2.1.0 - DEV (Win32) PHP / 5.0.2-Dev Configured - Resuming Normal Operations [Wed Aug 25 17:59:15 2004] [Notice ] Server Built: Aug 25 2004 16:03:58 [WED AUG 25 17:59:15 2004] [NOTED CHILD Process 988 [WED AUG 25 17:59:15 2004] Digest: Generating Secret For Digest Authentication ... [NOT AUG 25 17:59:15 2004] Digest: Done [Wed Aug 25 17:59:15 2004] Child Process Is Running [WED AUG 25 17: 59:15 2004] [NOT AUG 25 17:59:15 2004] Child 988: Starting 250 Worker Threads. [Wed Aug 25 17:59:15 2004] [ Notice] Child 988: Starting Thread to listen on port 8000. [WED AUG 25 17:59:15 2004] Child 988: Starting Thread To Listen on Port 80.

Think about it: You defirm the default setting maxRequestSperchild = 0. According to the official statement of Apache2, Child Process should never quit. The problem is coming out. Why is it automatically restarted? Is it a BUG of Apache2 or PHP5? So, continue to look down, you will find what is going on.

There is a problem to find a solution. In-depth code is a best way. The combination of PHP and Apache2 is PHP5APACHE2.DLL file. First go to PHP support, see that static text will cause the same problem (this is a very stupid idea). Because Apache2 itself is more than enough for HTML files, and in the same Web products, the performance of Apache2 is exactly the most. If you want to actually test this problem, find a big static text, remotely use AB command test, such as: AB-N2000 -C64 -DS http://172.16.2.1. The results show that there is no problem, just as the reason is.

The result came out, and it was definitely a combination of PHP5 and Apache2. Find the Handler program of PHP5 Apache2. Open SAPI_APACHE2.C. Apache2 Restart Prove with Abort, let's find the Abort character. Otherwise, two r-> connect-> Aborted. At the same time on Google, I found a bug report: http://bugs.php.net/bug.php? Id = 14542 similar to such bug report: http ://bugs.php.net/bug.php? Id = 14542. If you are not familiar with the source code programming of PHP, then you will drop two "|| r-> connect-> Aborted", then compile, you will find: The problem is solved. Think about the whole process, thinking is most important. It is often necessary to think seriously when there is no shorthand.

转载请注明原文地址:https://www.9cbs.com/read-123546.html

New Post(0)