{"id":1824,"date":"2026-03-03T09:53:57","date_gmt":"2026-03-03T01:53:57","guid":{"rendered":"https:\/\/www.52runoob.com\/?p=1824"},"modified":"2026-03-03T09:53:57","modified_gmt":"2026-03-03T01:53:57","slug":"php%e8%bf%90%e8%a1%8c%e6%97%b6%e9%94%99%e8%af%af%e5%af%bc%e8%87%b4%e7%9a%84%e6%9c%8d%e5%8a%a1%e4%b8%ad%e6%96%ad%e7%9a%84%e5%b8%b8%e8%a7%81%e5%8e%9f%e5%9b%a0%e5%92%8c%e8%a7%a3%e5%86%b3%e6%96%b9","status":"publish","type":"post","link":"https:\/\/www.52runoob.com\/index.php\/2026\/03\/03\/php%e8%bf%90%e8%a1%8c%e6%97%b6%e9%94%99%e8%af%af%e5%af%bc%e8%87%b4%e7%9a%84%e6%9c%8d%e5%8a%a1%e4%b8%ad%e6%96%ad%e7%9a%84%e5%b8%b8%e8%a7%81%e5%8e%9f%e5%9b%a0%e5%92%8c%e8%a7%a3%e5%86%b3%e6%96%b9\/","title":{"rendered":"PHP\u8fd0\u884c\u65f6\u9519\u8bef\u5bfc\u81f4\u7684\u670d\u52a1\u4e2d\u65ad\u7684\u5e38\u89c1\u539f\u56e0\u548c\u89e3\u51b3\u65b9\u6848"},"content":{"rendered":"\n<p>PHP \u8fd0\u884c\u65f6\u9519\u8bef\u5bfc\u81f4\u670d\u52a1\u4e2d\u65ad\uff0c\u901a\u5e38\u4e0d\u662f\u201c\u4ee3\u7801\u62a5\u9519\u201d\u8fd9\u4e48\u7b80\u5355\uff0c\u800c\u662f\u4f1a\u5f15\u53d1\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>502 Bad Gateway<\/li>\n\n\n\n<li>504 Gateway Timeout<\/li>\n\n\n\n<li>\u767d\u5c4f<\/li>\n\n\n\n<li>PHP-FPM \u5d29\u6e83<\/li>\n\n\n\n<li>\u8fdb\u7a0b\u88ab\u7cfb\u7edf Kill<\/li>\n<\/ul>\n\n\n\n<p>\u4e0b\u9762\u7ed9\u4f60\u4e00\u5957 <strong>\u751f\u4ea7\u73af\u5883\u7ea7\u522b\u7684\u5b8c\u6574\u5206\u6790\u4e0e\u89e3\u51b3\u65b9\u6848<\/strong>\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e00\u3001\u6700\u5e38\u89c1\u7684 7 \u5927\u539f\u56e0<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">1\ufe0f\u20e3 \u81f4\u547d\u9519\u8bef\uff08Fatal Error\uff09<\/h2>\n\n\n\n<p>\u5178\u578b\u62a5\u9519\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nUncaught Error: Call to undefined function\nUncaught Error: Class not found\nAllowed memory size exhausted\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">\u539f\u56e0<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8c03\u7528\u4e0d\u5b58\u5728\u51fd\u6570<\/li>\n\n\n\n<li>\u81ea\u52a8\u52a0\u8f7d\u5931\u8d25<\/li>\n\n\n\n<li>\u5185\u5b58\u6ea2\u51fa<\/li>\n\n\n\n<li>\u7c7b\u578b\u9519\u8bef\uff08PHP 8 \u66f4\u4e25\u683c\uff09<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u89e3\u51b3\u65b9\u6848<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nerror_reporting(E_ALL);\nini_set(&#039;display_errors&#039;, 1);\n\n<\/pre><\/div>\n\n\n<p>\u751f\u4ea7\u73af\u5883\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nini_set(&#039;display_errors&#039;, 0);\nini_set(&#039;log_errors&#039;, 1);\nini_set(&#039;error_log&#039;, &#039;\/var\/log\/php_error.log&#039;);\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">2\ufe0f\u20e3 \u5185\u5b58\u6ea2\u51fa\uff08Memory Exhausted\uff09<\/h2>\n\n\n\n<p>\u62a5\u9519\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nAllowed memory size of 134217728 bytes exhausted\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">\u539f\u56e0<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5927\u6570\u7ec4\u5faa\u73af<\/li>\n\n\n\n<li>\u65e0\u9650\u9012\u5f52<\/li>\n\n\n\n<li>\u4e00\u6b21\u6027\u8bfb\u53d6\u5927\u6587\u4ef6<\/li>\n\n\n\n<li>\u67e5\u8be2\u767e\u4e07\u6570\u636e<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u89e3\u51b3<\/h3>\n\n\n\n<p>php.ini\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nmemory_limit = 512M\n\n<\/pre><\/div>\n\n\n<p>\u4ee3\u7801\u4f18\u5316\uff08\u4e0d\u8981\u8fd9\u6837\uff09\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$data = $db-&gt;query(&quot;SELECT * FROM big_table&quot;)-&gt;fetchAll();\n\n<\/pre><\/div>\n\n\n<p>\u6539\u4e3a\u5206\u9875\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSELECT * FROM big_table LIMIT 1000\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">3\ufe0f\u20e3 \u65e0\u9650\u5faa\u73af \/ \u6b7b\u5faa\u73af<\/h2>\n\n\n\n<p>\u5178\u578b\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nwhile(true){\n}\n\n<\/pre><\/div>\n\n\n<p>\u6216\u9012\u5f52\u65e0\u7ec8\u6b62\u6761\u4ef6\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u540e\u679c<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CPU 100%<\/li>\n\n\n\n<li>PHP-FPM \u8fdb\u7a0b\u5361\u6b7b<\/li>\n\n\n\n<li>\u670d\u52a1\u5168\u90e8\u963b\u585e<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u89e3\u51b3<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8bbe\u7f6e\u8d85\u65f6\uff1a<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nset_time_limit(30);\n\n<\/pre><\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>\u4ee3\u7801\u52a0\u7ec8\u6b62\u6761\u4ef6<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">4\ufe0f\u20e3 \u5916\u90e8\u63a5\u53e3\u963b\u585e<\/h2>\n\n\n\n<p>\u6700\u5e38\u89c1\u771f\u5b9e\u95ee\u9898\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfile_get_contents(&quot;http:\/\/api.xxx.com&quot;);\n\n<\/pre><\/div>\n\n\n<p>\u9ed8\u8ba4\u65e0\u8d85\u65f6\uff0c\u4f1a\u4e00\u76f4\u5361\u4f4f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6b63\u786e\u5199\u6cd5<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$context = stream_context_create(&#x5B;\n    &#039;http&#039; =&gt; &#x5B;\n        &#039;timeout&#039; =&gt; 5\n    ]\n]);\n\nfile_get_contents($url, false, $context);\n\n<\/pre><\/div>\n\n\n<p>\u6216 cURL\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncurl_setopt($ch, CURLOPT_TIMEOUT, 10);\ncurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">5\ufe0f\u20e3 \u6570\u636e\u5e93\u9501\u8868 \/ \u6162\u67e5\u8be2<\/h2>\n\n\n\n<p>\u8868\u73b0\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u63a5\u53e3\u5076\u53d1\u8d85\u65f6<\/li>\n\n\n\n<li>\u9ad8\u5cf0\u671f\u5168\u90e8\u5d29\u6e83<\/li>\n<\/ul>\n\n\n\n<p>\u6392\u67e5\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSHOW PROCESSLIST;\n\n<\/pre><\/div>\n\n\n<p>\u5982\u679c\u770b\u5230\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nLocked\nWaiting for table metadata lock\n\n<\/pre><\/div>\n\n\n<p>\u8bf4\u660e\u9501\u4f4f\u4e86\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u89e3\u51b3<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u52a0\u7d22\u5f15<\/li>\n\n\n\n<li>\u907f\u514d\u4e8b\u52a1\u592a\u5927<\/li>\n\n\n\n<li>\u62c6\u5206\u5927 SQL<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">6\ufe0f\u20e3 PHP-FPM \u8fdb\u7a0b\u8017\u5c3d<\/h2>\n\n\n\n<p>\u5982\u679c\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npm.max_children = 5\n\n<\/pre><\/div>\n\n\n<p>\u5e76\u53d1 10 \u4e2a\u8bf7\u6c42\u5c31\u4f1a\u6392\u961f\u3002<\/p>\n\n\n\n<p>\u8868\u73b0\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9ad8\u5cf0\u671f 502<\/li>\n\n\n\n<li>Nginx upstream timed out<\/li>\n<\/ul>\n\n\n\n<p>\u89e3\u51b3\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npm.max_children = 50\n\n<\/pre><\/div>\n\n\n<p>\u91cd\u542f\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsystemctl restart php8.x-fpm\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">7\ufe0f\u20e3 \u81f4\u547d\u5f02\u5e38\u672a\u6355\u83b7<\/h2>\n\n\n\n<p>PHP 8 \u4e25\u683c\u7c7b\u578b\u540e\u5f88\u5e38\u89c1\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfunction test(int $a){}\ntest(&quot;abc&quot;);\n\n<\/pre><\/div>\n\n\n<p>\u4f1a\u76f4\u63a5 Fatal\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u89e3\u51b3<\/h3>\n\n\n\n<p>\u4f7f\u7528 try\/catch\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ntry {\n    test(&quot;abc&quot;);\n} catch (Throwable $e) {\n    error_log($e-&gt;getMessage());\n}\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u3001\u5bfc\u81f4\u201c\u670d\u52a1\u4e2d\u65ad\u201d\u7684\u771f\u6b63\u539f\u56e0<\/h1>\n\n\n\n<p>\u5f88\u591a\u4eba\u8bef\u4ee5\u4e3a\u662f\u201c\u4ee3\u7801\u62a5\u9519\u201d\u3002<\/p>\n\n\n\n<p>\u5b9e\u9645\u4e0a\u670d\u52a1\u4e2d\u65ad\u901a\u5e38\u6765\u81ea\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u95ee\u9898<\/th><th>\u672c\u8d28<\/th><\/tr><\/thead><tbody><tr><td>502<\/td><td>PHP-FPM \u5d29\u4e86<\/td><\/tr><tr><td>504<\/td><td>\u6267\u884c\u592a\u6162<\/td><\/tr><tr><td>\u767d\u5c4f<\/td><td>Fatal Error<\/td><\/tr><tr><td>\u9ad8\u5cf0\u671f\u5d29\u6e83<\/td><td>\u8fdb\u7a0b\u8017\u5c3d<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e09\u3001\u751f\u4ea7\u73af\u5883\u5fc5\u987b\u505a\u7684 8 \u4e2a\u9632\u62a4<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 1. \u6c38\u8fdc\u4e0d\u8981\u5f00\u542f display_errors<\/h2>\n\n\n\n<p>\u751f\u4ea7\u5fc5\u987b\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ndisplay_errors = Off\nlog_errors = On\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 2. \u5168\u5c40\u5f02\u5e38\u6355\u83b7<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nset_exception_handler(function($e){\n    error_log($e-&gt;getMessage());\n});\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 3. \u5168\u5c40\u9519\u8bef\u6355\u83b7<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nset_error_handler(function($errno,$errstr){\n    error_log($errstr);\n});\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 4. \u6ce8\u518c\u81f4\u547d\u9519\u8bef\u6355\u83b7<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nregister_shutdown_function(function(){\n    $error = error_get_last();\n    if($error){\n        error_log(json_encode($error));\n    }\n});\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 5. \u5f00\u542f\u6162\u65e5\u5fd7<\/h2>\n\n\n\n<p>php-fpm.conf\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nrequest_slowlog_timeout = 5s\nslowlog = \/var\/log\/php_slow.log\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 6. \u9650\u5236\u6700\u5927\u6267\u884c\u65f6\u95f4<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nmax_execution_time = 30\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 7. \u4f7f\u7528\u961f\u5217\u5904\u7406\u8017\u65f6\u4efb\u52a1<\/h2>\n\n\n\n<p>\u4e0d\u8981\u8ba9\u63a5\u53e3\u505a\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u53d1\u90ae\u4ef6<\/li>\n\n\n\n<li>\u5bfc\u51fa\u5927\u6570\u636e<\/li>\n\n\n\n<li>\u6279\u91cf\u66f4\u65b0<\/li>\n<\/ul>\n\n\n\n<p>\u7528\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Redis \u961f\u5217<\/li>\n\n\n\n<li>RabbitMQ<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 8. \u52a0\u7f13\u5b58<\/h2>\n\n\n\n<p>Redis \u7f13\u5b58\u53ef\u4ee5\u51cf\u5c11 90% \u8d85\u65f6\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u56db\u3001\u771f\u5b9e\u7ebf\u4e0a\u5d29\u6e83\u6848\u4f8b<\/h1>\n\n\n\n<h3 class=\"wp-block-heading\">\u6848\u4f8b1\uff1a\u65e5\u5fd7\u5199\u6ee1\u78c1\u76d8<\/h3>\n\n\n\n<p>error.log 30G<br>\u78c1\u76d8 100% \u2192 MySQL \u65e0\u6cd5\u5199\u5165 \u2192 \u670d\u52a1\u5d29\u6e83<\/p>\n\n\n\n<p>\u89e3\u51b3\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nlogrotate\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u6848\u4f8b2\uff1a\u9012\u5f52\u6b7b\u5faa\u73af<\/h3>\n\n\n\n<p>CPU 100%<br>FPM \u5361\u6b7b<\/p>\n\n\n\n<p>\u89e3\u51b3\uff1a\u9650\u5236\u9012\u5f52\u5c42\u6570<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u6848\u4f8b3\uff1a\u63a5\u53e3\u65e0\u8d85\u65f6\u8bbe\u7f6e<\/h3>\n\n\n\n<p>\u7b2c\u4e09\u65b9API\u5361 120 \u79d2<br>Nginx 60 \u79d2\u8d85\u65f6 \u2192 504<\/p>\n\n\n\n<p>\u89e3\u51b3\uff1a\u8bbe\u7f6e curl timeout<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e94\u3001\u5feb\u901f\u6392\u67e5\u547d\u4ee4<\/h1>\n\n\n\n<p>CPU\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ntop\n\n<\/pre><\/div>\n\n\n<p>\u5185\u5b58\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfree -m\n\n<\/pre><\/div>\n\n\n<p>FPM \u72b6\u6001\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nps aux | grep php-fpm\n\n<\/pre><\/div>\n\n\n<p>Nginx \u65e5\u5fd7\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/var\/log\/nginx\/error.log\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u516d\u3001\u7ec8\u6781\u603b\u7ed3<\/h1>\n\n\n\n<p>PHP \u8fd0\u884c\u65f6\u9519\u8bef\u5bfc\u81f4\u670d\u52a1\u4e2d\u65ad\uff0c\u672c\u8d28\u53ea\u6709 4 \u79cd\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5185\u5b58\u7206\u4e86<\/li>\n\n\n\n<li>\u6267\u884c\u5361\u4f4f<\/li>\n\n\n\n<li>\u5e76\u53d1\u592a\u5927<\/li>\n\n\n\n<li>\u914d\u7f6e\u592a\u5c0f<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5982\u679c\u4f60\u613f\u610f\uff0c\u6211\u53ef\u4ee5\u7ed9\u4f60\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\ud83d\udd25 \u4f01\u4e1a\u7ea7 PHP \u7a33\u5b9a\u6027\u52a0\u56fa\u5b8c\u6574\u65b9\u6848<\/li>\n\n\n\n<li>\ud83d\udd25 Nginx + PHP-FPM \u6700\u4f73\u751f\u4ea7\u914d\u7f6e<\/li>\n\n\n\n<li>\ud83d\udd25 \u9ad8\u5e76\u53d1\u63a5\u53e3\u4f18\u5316\u67b6\u6784\u56fe<\/li>\n\n\n\n<li>\ud83d\udd25 \u7ebf\u4e0a\u6545\u969c\u6392\u67e5\u6d41\u7a0b\u56fe<\/li>\n<\/ul>\n\n\n\n<p>\u4f60\u73b0\u5728\u7684\u73af\u5883\u662f\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PHP \u7248\u672c\uff1f<\/li>\n\n\n\n<li>Nginx \u8fd8\u662f Apache\uff1f<\/li>\n\n\n\n<li>\u62a5\u4ec0\u4e48\u5177\u4f53\u9519\u8bef\uff1f<\/li>\n<\/ul>\n\n\n\n<p>\u7ed9\u6211\u5177\u4f53\u62a5\u9519\uff0c\u6211\u5e2e\u4f60\u7cbe\u51c6\u5b9a\u4f4d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP \u8fd0\u884c\u65f6\u9519\u8bef\u5bfc\u81f4\u670d\u52a1\u4e2d\u65ad\uff0c\u901a\u5e38\u4e0d\u662f\u201c\u4ee3\u7801\u62a5\u9519\u201d\u8fd9\u4e48\u7b80\u5355\uff0c\u800c\u662f\u4f1a\u5f15\u53d1\uff1a \u4e0b\u9762&#8230; <a class=\"more-link\" href=\"https:\/\/www.52runoob.com\/index.php\/2026\/03\/03\/php%e8%bf%90%e8%a1%8c%e6%97%b6%e9%94%99%e8%af%af%e5%af%bc%e8%87%b4%e7%9a%84%e6%9c%8d%e5%8a%a1%e4%b8%ad%e6%96%ad%e7%9a%84%e5%b8%b8%e8%a7%81%e5%8e%9f%e5%9b%a0%e5%92%8c%e8%a7%a3%e5%86%b3%e6%96%b9\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-1824","post","type-post","status-publish","format-standard","hentry","category-php"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/1824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/comments?post=1824"}],"version-history":[{"count":1,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/1824\/revisions"}],"predecessor-version":[{"id":1825,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/1824\/revisions\/1825"}],"wp:attachment":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/media?parent=1824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/categories?post=1824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/tags?post=1824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}