{"id":100,"date":"2008-11-15T16:31:01","date_gmt":"2008-11-15T08:31:01","guid":{"rendered":""},"modified":"2014-02-27T22:54:27","modified_gmt":"2014-02-27T14:54:27","slug":"%e5%9c%a8iis%e4%b8%8a%e9%9b%86%e6%88%90php","status":"publish","type":"post","link":"http:\/\/www.xiaoyebailong.com\/index.php\/2008\/11\/15\/100.htm","title":{"rendered":"\u5728IIS\u4e0a\u96c6\u6210php"},"content":{"rendered":"<p>\u8fd9\u91cc\u6211\u5c31\u4e0d\u8bf4cgi\u4e86\uff0c\u56e0\u4e3acgi\u9700\u8981\u7cfb\u7edf\u6743\u9650\u8fc7\u9ad8\uff0c\u4e0d\u5efa\u8bae\u865a\u62df\u4e3b\u673a\u4f7f\u7528\uff0c\u800c\u4e14cgi\u7a0b\u5e8f\u4e5f\u5f88\u5c11\u6709\u4eba\u7528\u5230\uff0c\u697c\u4e3b\u8bf4\u7684\u8981iis6.0\u7ed3\u5408php <br \/>\n\u5b89\u88c5\u9700\u8981\uff1awindows2003\u7cfb\u7edf \u5b89\u88c5\u6709IIS6.0+php-5.1.1-Win32.zip+mysql\u6700\u65b0\u7248\u672c+zendO 3.20+phpmysamin2.8<\/p>\n<p>\u4e00\u3001\u5b89\u88c5 PHP <br \/>\n1.php-5.1.2-Win32.zip\uff0c\u76f4\u63a5\u5168\u90e8\u63a5\u538b\u81f3D:\\php\\\u76ee\u5f55\u5373\u53ef\u5f97PHP\u6587\u4ef6\u5b58\u653e\u76ee\u5f55D:\\php\\ <br \/>\n2.\u518d\u5c06PHP5\u4e3aD:\\php\\\u548c\u5b50\u6587\u4ef6\u5939ext\u4e0b\u7684\u6240\u6709dll\u6587\u4ef6\u62f7\u5230c:\\Windows\\system32(win2000\u7cfb\u7edf\u4e3a c:\/winnt\/system32\/)\u4e0b\uff0c\u8986\u76d6\u5df2\u6709\u7684dll\u6587\u4ef6 <br \/>\n3.\u5c06D:\\PHP\u76ee\u5f55\u4e0b\u7684php.exe\u3001php-win.exe\u548cphp.ini-dist\u4e09\u4e2a\u6587\u4ef6\u62f7\u5230C:\\Windows \uff08 Windows 2000 \u4e0b\u4e3a C:\\WINNT\uff09\u4e0b\uff1b \u5c06C:\\Windows\\php.ini-dist\u6539\u540d\u4e3aphp.ini,\u7136\u540e\u7528\u8bb0\u4e8b\u672c\u6253\u5f00\uff0c\u5229\u7528\u8bb0\u4e8b\u672c\u7684\u67e5\u627e\u529f\u80fd\u641c\u7d22 <br \/>\nregister_globals = Off <br \/>\n\uff0c\u5c06 Off \u6539\u6210 On \uff1b <br \/>\nextension_dir = <br \/>\n\uff0c\u5e76\u5c06\u5176\u8def\u5f84\u6307\u5230\u4f60\u7684 PHP \u76ee\u5f55\u4e0b\u7684 extensions \u76ee\u5f55\uff0c\u6bd4\u5982\uff1aextension_dir = &quot;D:\\php\\ext&quot; \uff1b <br \/>\n\u5c06\u4ee5\u4e0b\u5185\u5bb9\u524d\u9762\u7684;\u53bb\u6389 <br \/>\n;extension=php_dbase.dll <br \/>\n\u53ef\u9009 <br \/>\n;extension=php_gd2.dll <br \/>\n\u8fd9\u4e2a\u662f\u7528\u6765\u652f\u6301GD\u5e93\u7684\uff0c\u4e00\u822c\u9700\u8981\uff0c\u5fc5\u9009 <br \/>\n;extension=php_ldap.dll <br \/>\n\u53ef\u9009 <br \/>\n;extension=php_mbstring.dll <br \/>\n\u8fd9\u4e0d\u9009\u4e00\u822c\u7528PHPMYADMIN\u4f1a\u51fa\u7ea2\u8272\u63d0\u793a\uff0c\u6545\u5fc5\u9009 <br \/>\n;extension=php_mssql.dll <br \/>\n\u8fd9\u4e2a\u662f\u7528\u6765\u652f\u6301MSSQL\u7684\uff0c\u53ef\u9009 <br \/>\n;extension=php_mysql.dll <br \/>\n\u8fd9\u4e2a\u662f\u7528\u6765\u652f\u6301MYSQL\u7684\uff0c\u8981\u652f\u6301MYSQL\u5fc5\u9009 <br \/>\n4.Internet \u670d\u52a1\u7ba1\u7406\u5668&#8212;\u7f51\u7ad9\uff08\u53f3\u952e\uff09&#8212;\u5c5e\u6027&#8212;\u4e3b\u76ee\u5f55&#8212;\u914d\u7f6e&#8212;\u6dfb\u52a0&#8212;\u6269\u5c55\u540d\u4e3a .php \uff0c\u5355\u51fb&ldquo;\u6d4f\u89c8&rdquo;\u5c06\u53ef\u6267\u884c\u6587\u4ef6\u6307\u5411 php5isapi.dll \u6240\u5728\u8def\u5f84\uff0c\u5982\uff1aD:\\php\\php5isapi.dll <br \/>\n5.Internet \u670d\u52a1\u7ba1\u7406\u5668&#8212;Web \u4fe1\u606f\u7ba1\u7406\u5668&#8212;\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684web\u6269\u5c55\u7a0b\u5e8f&#8212;\u8f93\u5165\uff1aPHP \uff0c\u518d\u5c06\u53ef\u6267\u884c\u6587\u4ef6\u6307\u5411 php5isapi.dll \u6240\u5728\u8def\u5f84&#8212;\u5141\u8bb8 <br \/>\n5.\u5c06\u4ee5\u4e0b\u4ee3\u7801\u590d\u5236\u5230\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\u5185\uff0c\u4fdd\u5b58\u4e3a.bat\u6587\u4ef6 \u5e76\u8fd0\u884c <br \/>\nnet stop w3svc <br \/>\nnet stop iisadmin <br \/>\nnet start w3svc <br \/>\n6.\u65b0\u5efa\u4e00\u4e2a\u7f51\u7ad9 \u5728\u7f51\u7ad9\u76ee\u5f55\u4e0b\u5efa\u7acba.php \u5185\u5bb9\u4e3a <br \/>\n&lt;? <br \/>\nphpinfo(); <br \/>\n?&gt;<\/p>\n<p>\u4e8c\u3001\u5b89\u88c5mysql <br \/>\n\u5bf9\u4e8eMySQL\u6700\u65b0\u7248\uff0c\u89e3\u538b\uff0c\u53cc\u51fb\u6267\u884c Setup.exe \u4e00\u8defNext\u4e0b\u4e00\u6b65\uff0c\u9009\u62e9\u5b89\u88c5\u76ee\u5f55\u4e3aD:\\MySQL\u548c\u5b89\u88c5\u65b9\u5f0f\u4e3aCustom\u81ea\u5b9a\u4e49\u5b89\u88c5\uff0c\u518d\u4e00\u8defNext\u4e0b\u4e00\u6b65\uff0c\u6700\u540e\u4e00\u6b65\uff0c\u8df3\u8fc7\u5373\u53ef <br \/>\n\u5f00\u59cb&#8212;\u7a0b\u5e8f&#8212;MYSQL5.0&#8212;\u8fdb\u884c\u914d\u7f6emysql\u5e76\u8bbe\u7f6emysql\u5bc6\u7801<\/p>\n<p>\u4e09\u3001\u5b89\u88c5zendO3.2.0<\/p>\n<p>\u4e0b\u8f7d\u540e\u5f97\u5230 ZendOptimizer-3.2.0-Windows-i386.exe \uff0c\u76f4\u63a5\u53cc\u51fb\u5b89\u88c5\u5373\u53ef\uff0c\u5b89\u88c5\u8fc7\u7a0b\u8981\u4f60\u9009\u62e9 Web Server \u65f6\uff0c\u9009\u62e9 IIS \uff0c\u7136\u540e\u63d0\u793a\u4f60\u662f\u5426 Restart Web Server\uff0c\u9009\u62e9\u662f\uff0c\u5b8c\u6210\u5b89\u88c5\u4e4b\u524d\u63d0\u793a\u662f\u5426\u5907\u4efd php.ini \uff0c\u70b9\u786e\u5b9a\u540e\u5b89\u88c5\u5b8c\u6210\u3002\u6211\u8fd9\u91cc\u5b89\u88c5\u5230D:\\php\\Zend <br \/>\n\u4ee5\u4e0b\u4e24\u6b65\u7684\u76ee\u5f55\u6839\u636e\u4f60\u81ea\u5df1\u7684\u9ed8\u8ba4WEB\u7ad9\u70b9\u76ee\u5f55\u6765\u9009\uff0c\u5f53\u7136\u4e5f\u53ef\u4ee5\u9009\u62e9\u5230D:\\php\\Zend\u76ee\u5f55 <br \/>\nZend Optimizer \u7684\u5b89\u88c5\u5411\u5bfc\u4f1a\u81ea\u52a8\u6839\u636e\u4f60\u7684\u9009\u62e9\u6765\u4fee\u6539 php.ini \u5e2e\u52a9\u4f60\u542f\u52a8\u8fd9\u4e2a\u5f15\u64ce\u3002\u4e0b\u9762\u7b80\u5355\u4ecb\u7ecd\u4e00\u4e0b Zend Optimizer \u7684\u914d\u7f6e\u9009\u9879\u3002\u4ee5\u4e0b\u4e3a\u672c\u4eba\u5b89\u88c5\u5b8c\u6210\u540e php.ini \u91cc\u7684\u9ed8\u8ba4\u914d\u7f6e\u4ee3\u7801\uff08\u5206\u53f7\u540e\u9762\u7684\u5185\u5bb9\u4e3a\u6ce8\u91ca\uff09\uff1a <br \/>\nzend_extension_ts=&quot;D:\\php\\Zend\\lib\\ZendExtensionManager.dll&quot; <br \/>\n;Zend Optimizer \u6a21\u5757\u5728\u786c\u76d8\u4e0a\u7684\u5b89\u88c5\u8def\u5f84\u3002 <br \/>\nzend_extension_manager.optimizer_ts=&quot;D:\\php\\Zend\\lib\\Optimizer-3.2.0&quot; <br \/>\n;\u4f18\u5316\u5668\u6240\u5728\u76ee\u5f55\uff0c\u9ed8\u8ba4\u65e0\u987b\u4fee\u6539\u3002 <br \/>\nzend_optimizer.optimization_level=1023 <br \/>\n;\u4f18\u5316\u7a0b\u5ea6\uff0c\u8fd9\u91cc\u5b9a\u4e49\u542f\u52a8\u591a\u5c11\u4e2a\u4f18\u5316\u8fc7\u7a0b\uff0c\u9ed8\u8ba4\u503c\u662f 15 \uff0c\u8868\u793a\u540c\u65f6\u5f00\u542f 10 \u4e2a\u4f18\u5316\u8fc7\u7a0b\u4e2d\u7684 1-4 \uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u8fd9\u4e2a\u503c\u6539\u4e3a 1023 \uff0c\u8868\u793a\u5f00\u542f\u5168\u90e810\u4e2a\u4f18\u5316\u8fc7\u7a0b\u3002 <br \/>\n\u8c03\u7528phpinfo()\u51fd\u6570\u540e\u663e\u793a\uff1a <br \/>\nZend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies with Zend Extension Manager v1.0.9, Copyright (c) 2003-2006, by Zend Technologies with Zend Optimizer v3.2.0, Copyright (c) 1998-2006, by Zend Technologies \u5219\u8868\u793a\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<p>\u56db.\u5b89\u88c5GD\u5e93 <br \/>\n\u8fd9\u4e00\u6b65\u5728\u524d\u9762PHP.INI\u914d\u7f6e\u4e2d\u53bb\u6389&ldquo;;extension=php_gd2.dll&rdquo;\u524d\u9762\u7684;\u5b9e\u9645\u4e0a\u5df2\u7ecf\u5b89\u88c5\u597d\u4e86~ <br \/>\n[\u5728php.ini\u91cc\u627e\u5230&quot;extension=php_gd2.dll&quot;\u8fd9\u4e00\u884c\uff0c\u5e76\u4e14\u53bb\u6389\u524d\u9762\u7684\u5206\u53f7\uff0cgd\u5e93\u5b89\u88c5\u5b8c\u6210\uff0c\u7528echophpinfo();\u6d4b\u8bd5\u662f\u5426\u6210\u529f\uff01<\/p>\n<p>\u4e94\u3001\u5b89\u88c5 phpMyAdmin\uff1a <br \/>\n\u4e0b\u8f7d\u5f97\u5230 phpMyAdmin-2.8.0.zip \uff0c\u5c06\u5176\u89e3\u538b\u5230D:\\php\\\u6216\u8005 IIS \u6839\u76ee\u5f55\uff0c\u6539\u540dphpMyAdmin-2.8.0\u4e3aphpMyAdmin<\/p>\n<p>1\u3002\u627e\u5230 $cfg[&#8216;PmaAbsoluteUri&#8217;] <br \/>\n\u5728\u540e\u9762\u7684&#8221;\u5185\u628aphpMyAdmin\u7684\u5730\u5740\u6253\u4e0a\uff0c\u4fee\u6539\u540e\u5982 $cfg[&#8216;PmaAbsoluteUri&#8217;] = &#8216;http:\/\/www.szbar.com\/phpMyAdmin&#8217;; <br \/>\n2\u3002\u627e\u5230 $cfg[&#8216;blowfish_secret&#8217;] <br \/>\n\u5728\u540e\u9762\u7684&#8221;\u5185\u968f\u4fbf\u8f93\u5165\u4e00\u4e9b\u6570\u5b57\u6216\u5b57\u6bcd\uff0c\u4fee\u6539\u540e\u5982 $cfg[&#8216;blowfish_secret&#8217;] = &#8216;szbar&#8217;; <br \/>\n3\u3002\u627e\u5230 $cfg[&#8216;Servers&#8217;][$i][&#8216;auth_type&#8217;] <br \/>\n\u540e\u9762\u7684&#8221;\u5185\u9ed8\u8ba4\u4e3aconfig\uff0c\u4fee\u6539\u4e3acookie\uff0c\u4fee\u6539\u540e\u5982 $cfg[&#8216;Servers&#8217;][$i][&#8216;auth_type&#8217;] = &#8216;cookie&#8217;; <br \/>\n4\u3002\u627e\u5230 $cfg[&#8216;Servers&#8217;][$i][&#8216;user&#8217;] <br \/>\n\u540e\u9762\u7684&#8221;\u5185\u9ed8\u8ba4\u662froot\uff0c\u53bb\u6389\uff0c\u4fee\u6539\u540e\u5982 $cfg[&#8216;Servers&#8217;][$i][&#8216;user&#8217;] = &#8221;; <br \/>\n\u95ee\uff1a\u914d\u7f6e\u6587\u4ef6\u73b0\u5728\u9700\u8981\u7edd\u5bc6\u7684\u77ed\u8bed\u5bc6\u7801(blowfish_secret)\u3002\u600e\u4e48\u89e3\u51b3\uff1f <br \/>\n\u7b54\uff1a\u5728blowfish_secret\u8bbe\u7f6e\u7684\u5c31\u662f\u5b89\u88c5mysql\u65f6\u7684\u5bc6\u7801\uff01<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n\u8865\u5145\uff1a<br \/>\n\u65e0\u6cd5\u8f7d\u5165 mysql \u6269\u5c55,&lt;br \/&gt;\u8bf7\u68c0\u67e5 PHP \u914d\u95ee\u9898\u89e3\u51b3\u65b9\u5f0f\uff1a<br \/>\n\u7b2c\u4e00\u6b65\uff0c\u8f93\u51fa phpinfo() \u770b\u770b MySQL \u6a21\u5757\u662f\u5426\u6210\u529f\u88c5\u8f7d\uff0c\u5982\u679c\u6210\u529f\u88c5\u8f7d\u8bf4\u660e\u4f60\u89c1\u9b3c\u4e86\uff0c\u5426\u5219\u770b\u7b2c\u4e8c\u6b65<br \/>\n\u7b2c\u4e8c\u6b65\uff0c\u67e5\u770b extension_dir \u7684\u8bbe\u7f6e\u662f\u5426\u6b63\u786e<br \/>\n\u7b2c\u4e09\u6b65\uff0c\u67e5\u770b\u662f\u5426\u628a libmysql.dll \u6587\u4ef6\u590d\u5236\u5230 c:\\windows\\system32\\ \u4e0b<br \/>\n\u7b2c\u56db\u7248\uff0c\u91cd\u542fIIS<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u91cc\u6211\u5c31\u4e0d\u8bf4cgi\u4e86\uff0c\u56e0\u4e3acgi\u9700\u8981\u7cfb\u7edf\u6743\u9650\u8fc7\u9ad8\uff0c\u4e0d\u5efa\u8bae\u865a\u62df\u4e3b\u673a\u4f7f\u7528\uff0c\u800c\u4e14cgi\u7a0b\u5e8f\u4e5f\u5f88\u5c11\u6709\u4eba\u7528\u5230\uff0c\u697c\u4e3b\u8bf4\u7684\u8981iis6.0\u7ed3\u5408php \u5b89\u88c5\u9700\u8981\uff1awindows2003\u7cfb\u7edf \u5b89\u88c5\u6709IIS6.0+php-5.1.1-Win32.zip+mysq&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-100","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/comments?post=100"}],"version-history":[{"count":1,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/100\/revisions"}],"predecessor-version":[{"id":65961,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/100\/revisions\/65961"}],"wp:attachment":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media?parent=100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/categories?post=100"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/tags?post=100"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/topic?post=100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}