{"id":49656,"date":"2024-10-08T06:24:12","date_gmt":"2024-10-07T22:24:12","guid":{"rendered":"https:\/\/server.hk\/cnblog\/49656\/"},"modified":"2024-10-08T06:24:12","modified_gmt":"2024-10-07T22:24:12","slug":"win2003-php-%e4%bc%ba%e6%9c%8d%e5%99%a8%e7%9a%84%e7%aa%81%e7%a0%b4%e6%96%b0%e6%80%9d%e8%b7%af","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/49656\/","title":{"rendered":"Win2003 PHP \u4f3a\u670d\u5668\u7684\u7a81\u7834\u65b0\u601d\u8def"},"content":{"rendered":"<h1 id=\"win2003-php-%e4%bc%ba%e6%9c%8d%e5%99%a8%e7%9a%84%e7%aa%81%e7%a0%b4%e6%96%b0%e6%80%9d%e8%b7%af-AcqRQCSUSo\">Win2003 PHP \u4f3a\u670d\u5668\u7684\u7a81\u7834\u65b0\u601d\u8def<\/h1>\n<p>\u96a8\u8457\u79d1\u6280\u7684\u8fc5\u901f\u767c\u5c55\uff0c\u8a31\u591a\u4f01\u696d\u548c\u958b\u767c\u8005\u4ecd\u7136\u5728\u4f7f\u7528 Windows Server 2003 \u4f5c\u70ba\u5176 PHP \u4f3a\u670d\u5668\u7684\u57fa\u790e\u3002\u5118\u7ba1\u9019\u500b\u5e73\u53f0\u5df2\u7d93\u904e\u6642\uff0c\u4f46\u4ecd\u6709\u4e00\u4e9b\u5275\u65b0\u7684\u65b9\u6cd5\u53ef\u4ee5\u4f7f\u5176\u5728\u73fe\u4ee3\u74b0\u5883\u4e2d\u4fdd\u6301\u7af6\u722d\u529b\u3002\u672c\u6587\u5c07\u63a2\u8a0e\u5982\u4f55\u5728 Win2003 \u74b0\u5883\u4e2d\u512a\u5316 PHP \u4f3a\u670d\u5668\u7684\u6027\u80fd\uff0c\u4e26\u63d0\u4f9b\u4e00\u4e9b\u5be6\u7528\u7684\u5efa\u8b70\u548c\u6280\u5de7\u3002<\/p>\n<h2 id=\"1-%e7%92%b0%e5%a2%83%e9%85%8d%e7%bd%ae%e7%9a%84%e6%9c%80%e4%bd%b3%e5%af%a6%e8%b8%90-AcqRQCSUSo\">1. \u74b0\u5883\u914d\u7f6e\u7684\u6700\u4f73\u5be6\u8e10<\/h2>\n<p>\u5728\u4f7f\u7528 Windows Server 2003 \u6642\uff0c\u9996\u5148\u8981\u78ba\u4fdd\u4f3a\u670d\u5668\u7684\u74b0\u5883\u914d\u7f6e\u662f\u6700\u4f73\u7684\u3002\u9019\u5305\u62ec\u5b89\u88dd\u6700\u65b0\u7684\u5b89\u5168\u66f4\u65b0\u548c\u4fee\u88dc\u7a0b\u5f0f\uff0c\u4ee5\u6e1b\u5c11\u6f5b\u5728\u7684\u5b89\u5168\u98a8\u96aa\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5efa\u8b70\uff1a<\/p>\n<ul>\n<li>\u5b9a\u671f\u6aa2\u67e5\u4e26\u5b89\u88dd Windows \u66f4\u65b0\u3002<\/li>\n<li>\u4f7f\u7528\u6700\u65b0\u7248\u672c\u7684 PHP\uff0c\u5efa\u8b70\u4f7f\u7528 PHP 5.6\uff0c\u56e0\u70ba\u5b83\u5c0d Windows Server 2003 \u7684\u652f\u6301\u8f03\u597d\u3002<\/li>\n<li>\u914d\u7f6e IIS\uff08Internet Information Services\uff09\u4ee5\u652f\u6301 PHP\uff0c\u78ba\u4fdd\u6b63\u78ba\u8a2d\u7f6e FastCGI\u3002<\/li>\n<\/ul>\n<h2 id=\"2-%e6%80%a7%e8%83%bd%e5%84%aa%e5%8c%96-AcqRQCSUSo\">2. \u6027\u80fd\u512a\u5316<\/h2>\n<p>\u5728 Win2003 \u74b0\u5883\u4e2d\u904b\u884c PHP \u61c9\u7528\u7a0b\u5f0f\u6642\uff0c\u6027\u80fd\u512a\u5316\u662f\u81f3\u95dc\u91cd\u8981\u7684\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u53ef\u4ee5\u8003\u616e\u7684\u512a\u5316\u7b56\u7565\uff1a<\/p>\n<h3 id=\"2-1-%e4%bd%bf%e7%94%a8%e7%b7%a9%e5%ad%98%e6%8a%80%e8%a1%93-AcqRQCSUSo\">2.1 \u4f7f\u7528\u7de9\u5b58\u6280\u8853<\/h3>\n<p>\u7de9\u5b58\u53ef\u4ee5\u986f\u8457\u63d0\u9ad8 PHP \u61c9\u7528\u7a0b\u5f0f\u7684\u6027\u80fd\u3002\u53ef\u4ee5\u8003\u616e\u4f7f\u7528 APC\uff08Alternative PHP Cache\uff09\u6216 OPcache \u4f86\u7de9\u5b58 PHP \u8173\u672c\uff0c\u6e1b\u5c11\u6bcf\u6b21\u8acb\u6c42\u7684\u89e3\u6790\u6642\u9593\u3002<\/p>\n<pre><code>\n; \u5728 php.ini \u4e2d\u555f\u7528 APC\nextension=php_apc.dll\napc.enabled=1\napc.shm_size=64M\n<\/code><\/pre>\n<h3 id=\"2-2-%e6%95%b8%e6%93%9a%e5%ba%ab%e5%84%aa%e5%8c%96-AcqRQCSUSo\">2.2 \u6578\u64da\u5eab\u512a\u5316<\/h3>\n<p>\u5982\u679c\u60a8\u7684 PHP \u61c9\u7528\u7a0b\u5f0f\u4f9d\u8cf4\u65bc\u6578\u64da\u5eab\uff0c\u5247\u9700\u8981\u78ba\u4fdd\u6578\u64da\u5eab\u7684\u6027\u80fd\u4e5f\u662f\u6700\u4f73\u7684\u3002\u53ef\u4ee5\u8003\u616e\u4ee5\u4e0b\u5e7e\u9ede\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528\u7d22\u5f15\u4f86\u52a0\u901f\u67e5\u8a62\u3002<\/li>\n<li>\u5b9a\u671f\u6e05\u7406\u4e0d\u5fc5\u8981\u7684\u6578\u64da\u3002<\/li>\n<li>\u8003\u616e\u4f7f\u7528\u6578\u64da\u5eab\u7de9\u5b58\u6280\u8853\uff0c\u5982 Memcached\u3002<\/li>\n<\/ul>\n<h2 id=\"3-%e5%ae%89%e5%85%a8%e6%80%a7%e8%80%83%e9%87%8f-AcqRQCSUSo\">3. \u5b89\u5168\u6027\u8003\u91cf<\/h2>\n<p>\u7531\u65bc Windows Server 2003 \u5df2\u7d93\u4e0d\u518d\u7372\u5f97\u5b98\u65b9\u652f\u6301\uff0c\u56e0\u6b64\u5b89\u5168\u6027\u6210\u70ba\u4e00\u500b\u91cd\u8981\u7684\u8003\u91cf\u56e0\u7d20\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5efa\u8b70\u4f86\u63d0\u9ad8\u4f3a\u670d\u5668\u7684\u5b89\u5168\u6027\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528\u9632\u706b\u7246\u4f86\u9650\u5236\u4e0d\u5fc5\u8981\u7684\u7aef\u53e3\u3002<\/li>\n<li>\u5b9a\u671f\u5099\u4efd\u6578\u64da\uff0c\u4ee5\u9632\u6b62\u6578\u64da\u4e1f\u5931\u3002<\/li>\n<li>\u4f7f\u7528 SSL\/TLS \u52a0\u5bc6\u4f86\u4fdd\u8b77\u6578\u64da\u50b3\u8f38\u3002<\/li>\n<\/ul>\n<h2 id=\"4-%e9%81%b7%e7%a7%bb%e5%88%b0%e6%9b%b4%e6%96%b0%e5%b9%b3%e5%8f%b0%e7%9a%84%e8%80%83%e9%87%8f-AcqRQCSUSo\">4. \u9077\u79fb\u5230\u66f4\u65b0\u5e73\u53f0\u7684\u8003\u91cf<\/h2>\n<p>\u5118\u7ba1\u53ef\u4ee5\u901a\u904e\u4e0a\u8ff0\u65b9\u6cd5\u4f86\u512a\u5316 Win2003 PHP \u4f3a\u670d\u5668\uff0c\u4f46\u9577\u671f\u4f86\u770b\uff0c\u8003\u616e\u9077\u79fb\u5230\u66f4\u65b0\u7684\u5e73\u53f0\u662f\u660e\u667a\u7684\u9078\u64c7\u3002\u65b0\u7684\u64cd\u4f5c\u7cfb\u7d71\u548c\u4f3a\u670d\u5668\u74b0\u5883\u63d0\u4f9b\u4e86\u66f4\u597d\u7684\u6027\u80fd\u3001\u5b89\u5168\u6027\u548c\u652f\u6301\u3002<\/p>\n<h3 id=\"4-1-%e9%81%b7%e7%a7%bb%e7%9a%84%e6%ad%a5%e9%a9%9f-AcqRQCSUSo\">4.1 \u9077\u79fb\u7684\u6b65\u9a5f<\/h3>\n<p>\u5982\u679c\u6c7a\u5b9a\u9077\u79fb\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u57fa\u672c\u6b65\u9a5f\uff1a<\/p>\n<ul>\n<li>\u8a55\u4f30\u73fe\u6709\u61c9\u7528\u7a0b\u5f0f\u7684\u517c\u5bb9\u6027\u3002<\/li>\n<li>\u9078\u64c7\u5408\u9069\u7684\u65b0\u4f3a\u670d\u5668\u74b0\u5883\uff0c\u5982 Windows Server 2016 \u6216 Linux\u3002<\/li>\n<li>\u9032\u884c\u6e2c\u8a66\u9077\u79fb\uff0c\u78ba\u4fdd\u6240\u6709\u529f\u80fd\u6b63\u5e38\u904b\u884c\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-AcqRQCSUSo\">\u7e3d\u7d50<\/h2>\n<p>\u96d6\u7136 Windows Server 2003 \u5df2\u7d93\u904e\u6642\uff0c\u4f46\u901a\u904e\u9069\u7576\u7684\u914d\u7f6e\u548c\u512a\u5316\uff0c\u4ecd\u7136\u53ef\u4ee5\u5728\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u63d0\u5347\u5176\u6027\u80fd\u548c\u5b89\u5168\u6027\u3002\u7136\u800c\uff0c\u96a8\u8457\u6280\u8853\u7684\u9032\u6b65\uff0c\u8003\u616e\u9077\u79fb\u5230\u66f4\u65b0\u7684\u5e73\u53f0\u5c07\u662f\u66f4\u5177\u524d\u77bb\u6027\u7684\u9078\u64c7\u3002\u5c0d\u65bc\u9700\u8981\u7a69\u5b9a\u548c\u9ad8\u6548\u80fd\u7684\u61c9\u7528\u7a0b\u5f0f\uff0c\u9078\u64c7\u5408\u9069\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\u5c07\u662f\u660e\u667a\u7684\u9078\u64c7\uff0c\u7279\u5225\u662f\u5728\u9999\u6e2f\u9019\u6a23\u7684\u5e02\u5834\u4e2d\uff0c\u63d0\u4f9b\u4e86\u591a\u6a23\u5316\u7684\u9078\u64c7\u548c\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a2\u7d22 Win2003 PHP \u4f3a\u670d\u5668\u7684\u5275\u65b0\u89e3\u6c7a\u65b9\u6848\uff0c\u63d0\u5347\u6027\u80fd\u8207\u5b89\u5168\u6027\uff0c\u5be6\u73fe\u66f4\u9ad8\u6548\u7684\u7db2\u9801\u61c9\u7528\u958b\u767c\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-49656","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/49656","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=49656"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/49656\/revisions"}],"predecessor-version":[{"id":49657,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/49656\/revisions\/49657"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=49656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=49656"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=49656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}