﻿{"id":68,"date":"2009-06-30T11:15:18","date_gmt":"2009-06-30T11:15:18","guid":{"rendered":""},"modified":"2011-11-18T16:55:24","modified_gmt":"2011-11-18T08:55:24","slug":"68","status":"publish","type":"post","link":"http:\/\/zerobox.org\/notes\/68.html","title":{"rendered":"Apache\u4e0ePHP\u7684\u6574\u5408\u8fc7\u7a0b"},"content":{"rendered":"<p>apache\u4e0ePHP\u7684\u6574\u5408\u8fc7\u7a0b<br \/>\n\u4e3a\u4e86\u8ba9apache\u80fd\u591f\u652f\u6301PHP\u8bed\u8a00,\u56e0\u6b64\u5c31\u51fa\u73b0\u4e86PHP\u7684\u5b89\u88c5,<br \/>\n1.\u4e0b\u8f7dphp-5.1.6.tar.gz\u5b89\u88c5\u5305.(http:\/\/www.php.net\/downloads.php)<br \/>\n2.[root@study ~]# tar zxvf php-5.1.6.tar.gz<br \/>\n[root@study ~]# cd php-5.1.6<br \/>\n[root@study php-5.1.6]#.\/configure &#8211;with-apxs2=\/usr\/local\/apache\/bin\/apxs<br \/>\n[root@study php-5.1.6]#make<br \/>\n[root@study php-5.1.6]#make install<br \/>\n[root@study php-5.1.6]#cp php.ini-dist \/usr\/local\/lib\/php.ini<br \/>\n[root@study php-5.1.6]#cd \/usr\/local\/apache\/conf<br \/>\n[root@study conf]#vi httpd.conf<br \/>\n3.\u5b89\u88c5php\u5bf9httpd.conf\u6709\u4ee5\u4e0b\u51e0\u5904\u4fee\u6539:<\/p>\n<p>51 # Example:<br \/>\n52 # LoadModule foo_module modules\/mod_foo.so<br \/>\n53 LoadModule php5_module\u00a0 \u00a0\u00a0\u00a0modules\/libphp5.so<\/p>\n<p>284 &lt;IfModule mime_module&gt;<br \/>\n296\u00a0 \u00a0\u00a0\u00a0AddType application\/x-httpd-php .php<br \/>\n4.\u6b64\u540e\u53ef\u8fd0\u884capache\u670d\u52a1\u5668\u6d4b\u8bd5<br \/>\n\u5728\/usr\/local\/apache\/htdocs\u4e0b\u65b0\u5efa\u6587\u4ef6text.php\u5185\u5bb9\u5982\u4e0b:<br \/>\n&lt;? phpinfo(); ?&gt;<br \/>\n\u4fdd\u5b58\u9000\u51fa,\u8fd0\u884capache\u670d\u52a1:<br \/>\n[root@study conf]#cd \/usr\/local\/apache\/bin<br \/>\n[root@study bin]# .\/apachectl start &amp;<br \/>\n\u5728\u6d4f\u89c8\u5668\u5730\u5740\u680f\u8f93\u5165:\/\/192.168.1.1\/text.php\u51fa\u73b0PHP\u4fe1\u606f,\u8bf4\u660e\u5b89\u88c5\u6210\u529f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>apache\u4e0ePHP\u7684\u6574\u5408\u8fc7\u7a0b \u4e3a\u4e86\u8ba9apache\u80fd\u591f\u652f\u6301PHP\u8bed\u8a00,\u56e0\u6b64\u5c31\u51fa\u73b0 &hellip;<\/p>\n<p class=\"read-more\"><a href=\"http:\/\/zerobox.org\/notes\/68.html\">\u7ee7\u7eed\u9605\u8bfb &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[97,56],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","tag-apache","tag-php"],"views":802,"_links":{"self":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":0,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"wp:attachment":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}