{"id":229,"date":"2015-02-15T23:51:16","date_gmt":"2015-02-15T15:51:16","guid":{"rendered":"http:\/\/weitaoc.com\/?p=229"},"modified":"2015-02-16T00:09:46","modified_gmt":"2015-02-15T16:09:46","slug":"%e8%bf%b7%e8%b7%af%e7%9a%84%e8%80%81%e9%bc%a0%e5%8e%9f%e5%88%9b%e5%8d%b0%e7%ab%a0-windowsphpapachetomcat%e5%ae%8c%e7%be%8e%e9%9b%86%e6%88%90%e4%b9%8bphp%e5%92%8capache%e9%9b%86%e6%88%90","status":"publish","type":"post","link":"http:\/\/weitaoc.com\/?p=229","title":{"rendered":"windows+php+apache+tomcat\u5b8c\u7f8e\u96c6\u6210\u4e4bphp\u548capache\u96c6\u6210"},"content":{"rendered":"<p>\u597d\u4e86\uff0c\u6076\u5fc3\u7684\u4e1c\u897f\u6765\u4e86\u3002<\/p>\n<p>\u6211\u4eec\u5148\u5c06php\u89e3\u538b\uff0c\u627e\u5230\u6839\u76ee\u5f55\u4e0b\u7684php.ini-production\uff0c\u53bb\u6389\u540e\u9762\u7684-production\uff0c\u8bb0\u4e8b\u672c\u6253\u5f00\u3002<\/p>\n<p>\u627e\u5230extension=php_mysql.dll\uff0c\u5c06\u524d\u9762\u7684\u6ce8\u91ca\u53d6\u6d88\u3002\u63a5\u7740\u6253\u5f00mysql\u4e4b\u524d\u7684\u4e24\u4e2a\u4e1c\u897f\u3002\u4fee\u6539\u4e4b\u540e\u662f\u8fd9\u6837\u7684<\/p>\n<div class=\"codecolorer-container text geshi\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/><\/div><\/td><td><div class=\"text codecolorer\" style=\"white-space:nowrap\">extension=php_mbstring.dll<br \/>\nextension=php_exif.dll\u00a0\u00a0\u00a0\u00a0\u00a0 ; Must be after mbstring as it depends on it<br \/>\nextension=php_mysql.dll<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u5176\u4ed6\u7684\u5c31\u65e0\u6240\u8c13\u4e86\u3002<\/p>\n<p>\u7136\u540e\u5c31\u662fapache httpd.conf\u914d\u7f6e\uff0c\u5728\u6700\u540e\u65b0\u589e\uff1a<\/p>\n<div class=\"codecolorer-container text geshi\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/><\/div><\/td><td><div class=\"text codecolorer\" style=\"white-space:nowrap\">LoadModule php5_module &quot;D:\/soft\/php-5.4.37\/php5apache2_2.dll&quot;<br \/>\nPHPIniDir &quot;D:\/soft\/php-5.4.37\/php.ini&quot;<br \/>\nAddType application\/x-httpd-php .php .html .htm<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u7b2c\u4e00\u884cphp5apache2_2.dll\uff0c\u8fd9\u4e2a\u5c31\u662f\u5bf9\u5e94\u5230httpd\u7684\u5177\u4f53\u7248\u672c\uff0c2.4\u7684apache\u8bf7\u4e0b\u8f7dphp5.5\u53ca\u4ee5\u4e0a\u7684\u7248\u672c\u3002\u5bf9\u5e94\u7684dll\u662fphp5apache2_4.dll\u3002<\/p>\n<p>\u6253\u5f00apache httpd-vhosts.conf\uff0c\u65b0\u589e\uff1a<\/p>\n<div class=\"codecolorer-container text geshi\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/><\/div><\/td><td><div class=\"text codecolorer\" style=\"white-space:nowrap\">&lt;VirtualHost *:80&gt;<br \/>\n&nbsp; &nbsp; ServerAdmin weitaoc.com<br \/>\n&nbsp; &nbsp; DocumentRoot &quot;D:\/root\/apache\/web&quot;<br \/>\n&nbsp; &nbsp; ServerName weitaoc.com<br \/>\n&nbsp; &nbsp; ServerAlias www.dummy-host.yumuer.com<br \/>\n&nbsp; &nbsp; ErrorLog &quot;logs\/weitaoc.com-error.log&quot;<br \/>\n&nbsp; &nbsp; CustomLog &quot;logs\/weitaoc.com-access.log&quot; common<br \/>\n&lt;\/VirtualHost&gt;<br \/>\n<br \/>\n# \u5141\u8bb8\u5ba2\u6237\u7aef\u8bbf\u95ee\u6b64\u8def\u5f84<br \/>\n&lt;Directory &quot;D:\/root\/apache\/web&quot;&gt; &nbsp;<br \/>\n&nbsp; &nbsp;Options Indexes FollowSymLinks &nbsp;<br \/>\n&nbsp; &nbsp;AllowOverride all &nbsp;<br \/>\n&nbsp; &nbsp;Order allow,deny &nbsp;<br \/>\n&nbsp; &nbsp;Allow from all &nbsp;<br \/>\n&lt;\/Directory&gt;<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u57fa\u672c\u5c31\u5230\u8fd9\u91cc\u4e86\u3002\u4f46\u662f&#8230;\u4f60\u59b9\uff0capache\u91cd\u542f\u7684\u65f6\u5019\u6b7b\u6389\u4e86\uff0cstart\u4e0d\u4e86\u3002o my god\uff0c\u9ea6\u514b\u7d22\u8299\u7279\uff0c\u4f60\u662f\u51e0\u4e2a\u610f\u601d\u3002<\/p>\n<p>\u6298\u817e\u8bb8\u4e45\uff0c\u5728\u4e00\u7247\u8001\u5e16\u5b50\u91cc\u9762\u63d0\u5230\uff0c\u8bf7\u4e0b\u8f7d\u5e76\u5b89\u88c5Microsoft Visual C++ 2008\u548cMicrosoft Visual C++ 2010\uff0c\u6211\u89c9\u5f97\u5fae\u8f6f\u7684\u5b98\u65b9\u7f51\u7ad9\u5b9e\u5728\u65e0\u521b\u610f\uff0c\u76f4\u63a5\u7ed9\u51fa\u4e0b\u8f7d\u5730\u5740\u5427\u3002<\/p>\n<p><a href=\"http:\/\/www.microsoft.com\/zh-CN\/download\/confirmation.aspx?id=29\" target=\"_blank\">Microsoft Visual C++ 2008<\/a><\/p>\n<p><a href=\"http:\/\/www.microsoft.com\/zh-CN\/download\/confirmation.aspx?id=8328\" target=\"_blank\">Microsoft Visual C++ 2010<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u597d\u4e86\uff0c\u5230\u8fd9\u91cc\u4f60\u4ee5\u4e3a\u5b8c\u4e86\u5417\uff1f\u6ca1\u5b8c\u3002wordPress\u8fd8\u7559\u7ed9\u6211\u4eec\u51e0\u4e2a\u5751\uff1a<\/p>\n<p>1.\u5185\u5bb9\u7f16\u7801\u9519\u8bef\u65e0\u6cd5\u663e\u793a<\/p>\n<p>\u90e8\u7f72\u4e0awordPress\u770b\u770b\uff0c\u706b\u72d0\u9a6c\u4e0a\u4f1a\u7ed9\u4f60\u6cfc\u4e00\u76c6\u51b7\u6c34\u3002\u636e\u7f51\u4e0a\u5927\u5a76\u4f20\u95fb\uff0c\u662f\u56e0\u4e3aphp\u4e0d\u652f\u6301\u4e86\u67d0\u4e9b\u7b97\u6cd5\u5bfc\u81f4\uff0c\u9700\u8981\u4fee\u6539\u67d0\u4e9b\u7b97\u6cd5\uff0c\u53cd\u6b63\u6211\u53ea\u662f\u628aphp\u73af\u5883\u7684gzip\u653e\u5f00\u5c31\u597d\u4e86\uff0c\u81f3\u4e8e\u4f60\u4fe1\u4e0d\u4fe1\uff0c\u6211\u53cd\u6b63\u662f\u4fe1\u4e86\u3002<\/p>\n<div class=\"codecolorer-container text geshi\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/><\/div><\/td><td><div class=\"text codecolorer\" style=\"white-space:nowrap\">output_buffering = 4096<br \/>\n<br \/>\nzlib.output_compression = on<br \/>\n<br \/>\nzlib.output_compression_level = 3<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u8fd9\u4e2a\u6ce8\u91ca\u5343\u4e07\u522b\u6253\u5f00<\/p>\n<div class=\"codecolorer-container text geshi\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\" style=\"white-space:nowrap\">;zlib.output_handler =<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>2.Call to undefined function mb_strimwidth()<\/p>\n<p>\u8fd9\u4e2a\u597d\u89e3\u51b3\uff0cextension=php_mbstring.dll\u653e\u5f00\u6ce8\u91ca\u5c31\u884c\u4e86\uff0c\u5c31\u884c\u4e86\u4e48\uff1fno\u3002<\/p>\n<p>\u627e\u5230[mbstring]\u4e0b\u9762\u7684\u914d\u7f6e\uff0c\u653e\u5f00\u6ce8\u91ca\uff0c\u53c2\u6570\u5f88\u591a\uff0c\u6211\u8fd8\u6ca1\u9010\u4e2a\u53bb\u8bd5\uff0c\u6bd5\u7adf\uff0c\u54b1php\u4e5f\u662f\u4e1a\u4f59\u7684\uff0c\u5475\u5475\u3002<\/p>\n<p>\u53e6\u5916\u7684\u4e00\u79cd\u89e3\u51b3\u65b9\u6848\u5c31\u662f\u81ea\u5df1\u5199\u4e00\u4e2a\u5b57\u7b26\u4e32\u622a\u53d6\u7684\u65b9\u6cd5\u8c03\u7528\uff0c\u4e5f\u662f\u4e2a\u597d\u529e\u6cd5\u3002<\/p>\n<div class=\"codecolorer-container text geshi\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/><\/div><\/td><td><div class=\"text codecolorer\" style=\"white-space:nowrap\">\/\/\u65b0\u589e\u65b9\u6cd5<br \/>\nfunction ok_strimwidth($str ,$start , $width ,$trimmarker ){<br \/>\n$output = preg_replace('\/^(?:[x00-x7F]|[xC0-xFF][x80-xBF]+){0,'.$start.'}((?:[x00-x7F]|[xC0-xFF][x80-xBF]+){0,'.$width.'}).*\/s','1',$str);<br \/>\nreturn $output.$trimmarker;<br \/>\n}<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>3.url rewrite<\/p>\n<p>\u4e3a\u4e86url\u597d\u770b\uff0c\u600e\u80fd\u4e0d\u6253\u626e\u6253\u626e\uff0c\u6253\u5f00apache httpd.conf\uff0c\u53d6\u6d88\u8fd9\u4e2a\u6ce8\u91ca<\/p>\n<div class=\"codecolorer-container text geshi\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\" style=\"white-space:nowrap\">LoadModule rewrite_module modules\/mod_rewrite.so<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u627e\u5230AllowOverride\uff0c\u628aAllowOverride None\u4fee\u6539\u6210AllowOverride all\u3002<\/p>\n<p>\u5728\u6240\u9700\u8981\u8fdb\u884crewrite\u7684web\u7684\u4e3b\u76ee\u5f55\u4e0b\u6dfb\u52a0.htaccess\u6587\u4ef6\uff0c\u6dfb\u52a0\u4e0a\u4e00\u53e5\u8bdd\uff1aRewriteEngine on\u3002<\/p>\n<p>.htaccess\u6587\u4ef6\u5185\u5bb9<\/p>\n<div class=\"codecolorer-container text geshi\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/><\/div><\/td><td><div class=\"text codecolorer\" style=\"white-space:nowrap\">RewriteEngine On<br \/>\nRewriteBase \/<br \/>\nRewriteRule ^index\\.php$ - [L]<br \/>\nRewriteCond %{REQUEST_FILENAME} !-f<br \/>\nRewriteCond %{REQUEST_FILENAME} !-d<br \/>\nRewriteRule . \/index.php [L]<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u4ec0\u4e48\uff1f\u4f60\u6ca1\u529e\u6cd5\u521b\u5efa\u6ca1\u6709\u540d\u79f0\u7684\u6587\u4ef6\uff1f<br \/>\n\u6709\u4e2a\u6587\u672c\u7f16\u8f91\u5668\u53ebNotePad++\u3002<br \/>\n\u4ec0\u4e48\uff1f\u4e0d\u77e5\u9053\uff1f<br \/>\n\u90a3EditPlus\uff1f<br \/>\n\u8fd8\u4e0d\u77e5\u9053\uff1f<br \/>\n\u54e5\u4eec\uff0c\u8f6c\u884c\u5427\uff0c\u6211\u53ea\u80fd\u5e2e\u5230\u8fd9\u4e86\u3002<\/p>\n<p><a href=\"http:\/\/weitaoc.com\/archives\/229\/1-7\" rel=\"attachment wp-att-230\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-230\" alt=\"1\" src=\"http:\/\/weitaoc.com\/wp-content\/uploads\/2015\/02\/11.jpg\" width=\"278\" height=\"181\" \/><\/a><\/p>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1a<a href=\"http:\/\/weitaoc.com\">\u8ff7\u8def\u7684\u8001\u9f20<\/a> &raquo; <a href=\"http:\/\/weitaoc.com\/?p=229\">windows+php+apache+tomcat\u5b8c\u7f8e\u96c6\u6210\u4e4bphp\u548capache\u96c6\u6210<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>\u597d\u4e86\uff0c\u6076\u5fc3\u7684\u4e1c\u897f\u6765\u4e86\u3002 \u6211\u4eec\u5148\u5c06php\u89e3\u538b\uff0c\u627e\u5230\u6839\u76ee\u5f55\u4e0b\u7684php.ini-production\uff0c\u53bb\u6389\u540e\u9762\u7684-production\uff0c\u8bb0\u4e8b\u672c\u6253\u5f00\u3002 \u627e\u5230extension=php_mysql.dll\uff0c\u5c06\u524d\u9762\u7684\u6ce8\u91ca\u53d6\u6d88\u3002\u63a5\u7740\u6253\u5f00mysql\u4e4b\u524d\u7684\u4e24\u4e2a\u4e1c\u897f\u3002\u4fee [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[44],"class_list":["post-229","post","type-post","status-publish","format-standard","hentry","category-middleware","tag-44"],"views":5017,"_links":{"self":[{"href":"http:\/\/weitaoc.com\/index.php?rest_route=\/wp\/v2\/posts\/229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/weitaoc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/weitaoc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/weitaoc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/weitaoc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=229"}],"version-history":[{"count":0,"href":"http:\/\/weitaoc.com\/index.php?rest_route=\/wp\/v2\/posts\/229\/revisions"}],"wp:attachment":[{"href":"http:\/\/weitaoc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/weitaoc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=229"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/weitaoc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}