{"id":54183,"date":"2024-10-09T17:26:42","date_gmt":"2024-10-09T09:26:42","guid":{"rendered":"https:\/\/server.hk\/cnblog\/54183\/"},"modified":"2024-10-09T17:26:42","modified_gmt":"2024-10-09T09:26:42","slug":"windows-2003-iis6-%e9%85%8d%e7%bd%ae-php-%e5%92%8c-mysql-%e6%95%b8%e6%93%9a%e5%ba%ab","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/54183\/","title":{"rendered":"Windows 2003 IIS6 \u914d\u7f6e PHP \u548c MySQL \u6578\u64da\u5eab"},"content":{"rendered":"<h1 id=\"windows-2003-iis6-%e9%85%8d%e7%bd%ae-php-%e5%92%8c-mysql-%e6%95%b8%e6%93%9a%e5%ba%ab-WIHAXjJQOA\">Windows 2003 IIS6 \u914d\u7f6e PHP \u548c MySQL \u6578\u64da\u5eab<\/h1>\n<p>\u5728\u7576\u4eca\u7684\u7db2\u7d61\u74b0\u5883\u4e2d\uff0c\u8a31\u591a\u4f01\u696d\u548c\u958b\u767c\u8005\u4ecd\u7136\u4f7f\u7528 Windows 2003 \u4f5c\u70ba\u5176\u4f3a\u670d\u5668\u64cd\u4f5c\u7cfb\u7d71\u3002\u5118\u7ba1\u9019\u500b\u7248\u672c\u7684 Windows \u5df2\u7d93\u904e\u6642\uff0c\u4f46\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u4ecd\u7136\u9700\u8981\u5728 IIS6 \u4e0a\u914d\u7f6e PHP \u548c MySQL \u6578\u64da\u5eab\u3002\u672c\u6587\u5c07\u8a73\u7d30\u4ecb\u7d39\u5982\u4f55\u5728 Windows 2003 IIS6 \u74b0\u5883\u4e2d\u9032\u884c\u9019\u4e9b\u914d\u7f6e\u3002<\/p>\n<h2 id=\"%e5%ae%89%e8%a3%9d-iis6-WIHAXjJQOA\">\u5b89\u88dd IIS6<\/h2>\n<p>\u9996\u5148\uff0c\u78ba\u4fdd\u4f60\u7684 Windows 2003 \u7cfb\u7d71\u5df2\u7d93\u5b89\u88dd\u4e86 IIS6\u3002\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0b\u6b65\u9a5f\u4f86\u5b89\u88dd\uff1a<\/p>\n<ol>\n<li>\u6253\u958b\u300c\u63a7\u5236\u9762\u677f\u300d\u3002<\/li>\n<li>\u9078\u64c7\u300c\u6dfb\u52a0\/\u522a\u9664\u7a0b\u5e8f\u300d\u3002<\/li>\n<li>\u9ede\u64ca\u300c\u6dfb\u52a0\/\u522a\u9664 Windows \u7d44\u4ef6\u300d\u3002<\/li>\n<li>\u5728\u7d44\u4ef6\u5217\u8868\u4e2d\uff0c\u9078\u64c7\u300cInternet \u4fe1\u606f\u670d\u52d9 (IIS)\u300d\uff0c\u7136\u5f8c\u9ede\u64ca\u300c\u8a73\u7d30\u4fe1\u606f\u300d\u3002<\/li>\n<li>\u78ba\u4fdd\u9078\u4e2d\u300cWeb \u670d\u52d9\u300d\u548c\u300cFTP \u670d\u52d9\u300d\uff0c\u7136\u5f8c\u9ede\u64ca\u300c\u78ba\u5b9a\u300d\u3002<\/li>\n<li>\u5b8c\u6210\u5b89\u88dd\u5f8c\uff0c\u91cd\u555f\u4f3a\u670d\u5668\u3002<\/li>\n<\/ol>\n<h2 id=\"%e5%ae%89%e8%a3%9d-php-WIHAXjJQOA\">\u5b89\u88dd PHP<\/h2>\n<p>\u63a5\u4e0b\u4f86\uff0c\u6211\u5011\u9700\u8981\u5b89\u88dd PHP\u3002\u4ee5\u4e0b\u662f\u5b89\u88dd\u6b65\u9a5f\uff1a<\/p>\n<ol>\n<li>\u4e0b\u8f09 PHP \u7684 Windows \u7248\u672c\uff0c\u901a\u5e38\u53ef\u4ee5\u5f9e <a href=\"https:\/\/windows.php.net\/download\/\" rel=\"nofollow noopener\" target=\"_blank\">PHP \u5b98\u65b9\u7db2\u7ad9<\/a> \u7372\u5f97\u3002<\/li>\n<li>\u89e3\u58d3\u7e2e\u4e0b\u8f09\u7684\u6587\u4ef6\u5230\u4e00\u500b\u76ee\u9304\uff0c\u4f8b\u5982 C:PHP\u3002<\/li>\n<li>\u5728 C:PHP \u76ee\u9304\u4e2d\uff0c\u627e\u5230 php.ini-development \u6587\u4ef6\uff0c\u5c07\u5176\u8907\u88fd\u4e26\u91cd\u547d\u540d\u70ba php.ini\u3002<\/li>\n<li>\u7de8\u8f2f php.ini \u6587\u4ef6\uff0c\u78ba\u4fdd\u4ee5\u4e0b\u884c\u88ab\u53d6\u6d88\u8a3b\u89e3\u4e26\u8a2d\u7f6e\u70ba\u6b63\u78ba\u7684\u503c\uff1a<\/li>\n<pre><code>extension_dir = \"C:PHPext\"<\/code><\/pre>\n<li>\u5728 IIS6 \u4e2d\uff0c\u53f3\u9375\u9ede\u64ca\u300c\u7db2\u7ad9\u300d\uff0c\u9078\u64c7\u300c\u5c6c\u6027\u300d\uff0c\u7136\u5f8c\u8f49\u5230\u300c\u4e3b\u76ee\u9304\u300d\u9078\u9805\u5361\u3002<\/li>\n<li>\u9ede\u64ca\u300c\u914d\u7f6e\u300d\uff0c\u5728\u300c\u61c9\u7528\u7a0b\u5f0f\u6620\u5c04\u300d\u4e2d\u6dfb\u52a0\u4e00\u500b\u65b0\u7684\u6620\u5c04\uff0c\u8a2d\u7f6e\u5982\u4e0b\uff1a<\/li>\n<ul>\n<li>\u53ef\u57f7\u884c\u6587\u4ef6\uff1aC:PHPphp-cgi.exe<\/li>\n<li>\u64f4\u5c55\u540d\uff1a.php<\/li>\n<\/ul>\n<li>\u9ede\u64ca\u300c\u78ba\u5b9a\u300d\uff0c\u7136\u5f8c\u91cd\u555f IIS\u3002<\/li>\n<\/ol>\n<h2 id=\"%e5%ae%89%e8%a3%9d-mysql-WIHAXjJQOA\">\u5b89\u88dd MySQL<\/h2>\n<p>\u63a5\u4e0b\u4f86\uff0c\u6211\u5011\u9700\u8981\u5b89\u88dd MySQL \u6578\u64da\u5eab\u3002\u4ee5\u4e0b\u662f\u5b89\u88dd\u6b65\u9a5f\uff1a<\/p>\n<ol>\n<li>\u5f9e <a href=\"https:\/\/dev.mysql.com\/downloads\/mysql\/\" rel=\"nofollow noopener\" target=\"_blank\">MySQL \u5b98\u65b9\u7db2\u7ad9<\/a> \u4e0b\u8f09\u9069\u5408 Windows \u7684\u5b89\u88dd\u5305\u3002<\/li>\n<li>\u904b\u884c\u5b89\u88dd\u7a0b\u5e8f\uff0c\u4e26\u6309\u7167\u63d0\u793a\u9032\u884c\u5b89\u88dd\u3002\u9078\u64c7\u300c\u5178\u578b\u5b89\u88dd\u300d\u4ee5\u4fbf\u5feb\u901f\u5b89\u88dd\u3002<\/li>\n<li>\u5b89\u88dd\u5b8c\u6210\u5f8c\uff0c\u555f\u52d5 MySQL \u670d\u52d9\u3002\u53ef\u4ee5\u901a\u904e\u300c\u670d\u52d9\u300d\u7ba1\u7406\u5de5\u5177\u4f86\u555f\u52d5\u3002<\/li>\n<li>\u4f7f\u7528 MySQL \u7684\u547d\u4ee4\u884c\u5de5\u5177\u6216\u5716\u5f62\u754c\u9762\u5de5\u5177\uff08\u5982 MySQL Workbench\uff09\u4f86\u5275\u5efa\u6578\u64da\u5eab\u548c\u7528\u6236\u3002<\/li>\n<li>\u4f8b\u5982\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5275\u5efa\u4e00\u500b\u65b0\u7684\u6578\u64da\u5eab\uff1a<\/li>\n<pre><code>CREATE DATABASE my_database;<\/code><\/pre>\n<li>\u4e26\u5275\u5efa\u4e00\u500b\u7528\u6236\u4e26\u6388\u4e88\u6b0a\u9650\uff1a<\/li>\n<pre><code>CREATE USER 'my_user'@'localhost' IDENTIFIED BY 'my_password';\nGRANT ALL PRIVILEGES ON my_database.* TO 'my_user'@'localhost';<\/code><\/pre>\n<\/li>\n<\/ol>\n<h2 id=\"%e6%b8%ac%e8%a9%a6%e9%85%8d%e7%bd%ae-WIHAXjJQOA\">\u6e2c\u8a66\u914d\u7f6e<\/h2>\n<p>\u6700\u5f8c\uff0c\u70ba\u4e86\u78ba\u4fdd PHP \u548c MySQL \u7684\u914d\u7f6e\u6b63\u78ba\uff0c\u6211\u5011\u53ef\u4ee5\u5275\u5efa\u4e00\u500b\u7c21\u55ae\u7684 PHP \u6e2c\u8a66\u6587\u4ef6\u3002\u5728 C:inetpubwwwroot \u76ee\u9304\u4e0b\u5275\u5efa\u4e00\u500b\u540d\u70ba test.php \u7684\u6587\u4ef6\uff0c\u4e26\u6dfb\u52a0\u4ee5\u4e0b\u5167\u5bb9\uff1a<\/p>\n<pre><code>&lt;?php\nphpinfo();\n?&gt;<\/code><\/pre>\n<p>\u7136\u5f8c\u5728\u700f\u89bd\u5668\u4e2d\u8a2a\u554f http:\/\/localhost\/test.php\u3002\u5982\u679c\u4e00\u5207\u6b63\u5e38\uff0c\u4f60\u61c9\u8a72\u80fd\u770b\u5230 PHP \u7684\u914d\u7f6e\u4fe1\u606f\u9801\u9762\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-WIHAXjJQOA\">\u7e3d\u7d50<\/h2>\n<p>\u5728 Windows 2003 IIS6 \u74b0\u5883\u4e2d\u914d\u7f6e PHP \u548c MySQL \u6578\u64da\u5eab\u7684\u904e\u7a0b\u96d6\u7136\u6709\u4e9b\u7e41\u7463\uff0c\u4f46\u53ea\u8981\u6309\u7167\u4e0a\u8ff0\u6b65\u9a5f\u9032\u884c\uff0c\u5c31\u80fd\u6210\u529f\u5b8c\u6210\u3002\u9019\u6a23\u7684\u914d\u7f6e\u5c0d\u65bc\u9700\u8981\u4f7f\u7528\u820a\u7248 Windows \u4f3a\u670d\u5668\u7684\u61c9\u7528\u7a0b\u5e8f\u4f86\u8aaa\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u5982\u679c\u4f60\u6b63\u5728\u5c0b\u627e\u66f4\u73fe\u4ee3\u7684\u89e3\u6c7a\u65b9\u6848\uff0c\u8003\u616e\u4f7f\u7528 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u6216\u5176\u4ed6\u96f2\u4f3a\u670d\u5668\u670d\u52d9\uff0c\u4ee5\u4fbf\u7372\u5f97\u66f4\u597d\u7684\u6027\u80fd\u548c\u5b89\u5168\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to configure PHP and MySQL on Windows 2003 IIS6 for optimal performance and seamless web application development.<\/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-54183","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/54183","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=54183"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/54183\/revisions"}],"predecessor-version":[{"id":54184,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/54183\/revisions\/54184"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=54183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=54183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=54183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}