{"id":167207,"date":"2020-10-10T19:33:50","date_gmt":"2020-10-10T11:33:50","guid":{"rendered":"http:\/\/4563.org\/?p=167207"},"modified":"2020-10-10T19:33:50","modified_gmt":"2020-10-10T11:33:50","slug":"%e6%b1%82%e5%8a%a9-%e4%bf%ae%e6%94%b9%e4%ba%86-php-ini-%e6%89%a7%e8%a1%8c-php-reload-%e6%8a%a5%e9%94%99","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=167207","title":{"rendered":"\u6c42\u52a9, \u4fee\u6539\u4e86 PHP .ini, \u6267\u884c PHP -reload \u62a5\u9519"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u6c42\u52a9, \u4fee\u6539\u4e86 PHP .ini, \u6267\u884c PHP -reload \u62a5\u9519               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : edk24 <\/span>  <span><i><\/i> 6<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<pre><code>[[email&#160;protected] bin]# .\/php -reload PHP Parse error:  syntax error, unexpected end of file in Command line code on line 1  Parse error: syntax error, unexpected end of file in Command line code on line 1 <\/code><\/pre>\n<p>\u8fd9\u4e2a\u9519\u6211\u771f\u627e\u4e0d\u5230\u5728\u54ea\u513f, \u67e5\u4e86\u5f88\u591a\u51e0\u4e4e\u90fd\u662f, \u600e\u4e48\u6253\u5f00\u5173\u95ed php \u9519\u8bef\u8b66\u544a\u7684.<\/p>\n<p>\u6c42\u5927\u4f6c\u5e2e\u6211\u770b\u770b<\/p>\n<p>\u4fee\u6539\u8fc7<code>open_basedir<\/code>\u548c<code>\u7981\u7528\u51fd\u6570<\/code>, \u4ee5\u53ca\u5b89\u88c5\u8fc7 imagick,\u540e\u6765\u79fb\u9664\u4e86 \u7528<code>exec<\/code>\u66ff\u4ee3,<\/p>\n<p>\u73b0\u5728\u914d\u7f6e\u6587\u4ef6\u4e0d\u80fd\u66f4\u65b0, \u7981\u7528\u51fd\u6570\u4e00\u76f4\u88ab\u7981\u7528\u7684;<\/p>\n<p>\u602a\u81ea\u5df1\u6ca1\u6709\u5907\u4efd<\/p>\n<p>php.ini \u6587\u4ef6\u5185\u5bb9\u5728\u8fd9\u91cc:<\/p>\n<p>https:\/\/gist.github.com\/edk24\/b0a272a5ccd2185e8cb157c86d72e00f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>9<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3696140\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zarte <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             open_basedir \u6ce8\u91ca\u6389\u8bd5\u4e0b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3696141\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dilu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u786c\u751f\u751f\u6ca1\u770b\u61c2 .\/php -reload \u662f\u4e2a\u5565\u547d\u4ee4\uff1f\u6709\u8fd9\u4e2a\u73a9\u610f\uff1f<\/p>\n<p>\u4f60\u6539\u5b8c\u4e86 ini \u6587\u4ef6 php-cli \u7acb\u5373\u751f\u6548 php-fpm \u91cd\u542f\u751f\u6548                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3696142\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : setsunakute <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             php -r \u662f -r &lt;code&gt; Run PHP &lt;code&gt; without using script tags &lt;?..?&gt;<br \/>\u6240\u4ee5\u4f60\u7684 php -reload \u76f8\u5f53\u4e8e\u6267\u884c eload \u8fd9\u6bb5\u4ee3\u7801, \u81ea\u7136\u5c31\u62a5\u9519\u4e86<br \/>php -r&#8217;echo 1;&#8217; \u5c31\u4f1a\u8f93\u51fa 1<\/p>\n<p>\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u7684\u8bdd, \u6309\u7167 2 \u7684\u5c31\u53ef\u4ee5, php-cli \u4e0d\u9700\u8981\u91cd\u542f, php-fpm \u91cd\u542f\u540e\u751f\u6548                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3696143\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : edk24 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zarte \u8c22\u8c22, \u6309\u7167\u4e8c\u7684\u65b9\u5f0f\u5df2\u7ecf\u89e3\u51b3\u4e86. \u662f\u6211\u6ca1\u4e86\u89e3\u5b83\u7684\u51e0\u79cd\u8fd0\u884c\u65b9\u5f0f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3696144\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : edk24 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @dilu \u8c22\u8c22, \u5df2\u89e3\u51b3\u4e86. \u602a\u6211\u6ca1\u4e86\u89e3\u597d\u5b83\u7684\u8fd0\u884c\u65b9\u5f0f. php \u662f cli \u7684,, fpm \u624d\u662f\u548c nginx \u5bf9\u63a5\u7684 [\u54ed\u7b11]                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3696145\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : edk24 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @setsunakute \u5927\u5f7b\u5927\u609f, \u539f\u6765\u5b83\u662f\u8fd9\u6837\u62a5\u8fd9\u4e2a\u9519\u8bef\u7684. \u6211\u67e5\u4e86\u767e\u5ea6\u548c\u5f88\u591a\u5e16\u5b50\u8bf4\u662f\u6709\u8fd9\u6837\u7684\u9009\u9879 \u5c31\u8fd9\u6837\u628a\u81ea\u5df1\u6478\u778e\u7684\u5751\u4e86. \u4ee5\u540e\u591a\u5173\u6ce8\u5173\u6ce8 -help \u563f\u563f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3696146\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xiaochong0302 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @setsunakute \u8fd9\u79cd\u53c2\u6570\u771f\u6ca1\u7528\u8fc7\uff0c\u7b80\u5355\u7684\u8bed\u53e5\u7528 php -a \u76f8\u5f53\u4e8e\u547d\u4ee4\u884c\u4ea4\u4e92\u5f0f\uff0c\u590d\u6742\u7684\u5c31\u6267\u884c\u6587\u4ef6\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3696147\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : setsunakute <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @edk24 @xiaochong0302 \u6211\u4e5f\u662f\u770b\u5230 php -reload \u8fd9\u4e2a\u547d\u4ee4\u6bd4\u8f83\u5947\u602a, \u5c31\u770b\u4e86-h \u624d\u77e5\u9053\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3696148\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Joyboo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u770b\u6765\u4e0d\u6b62\u6211\u4e00\u4e2a\u4eba\u770b\u5230 -reload \u695e\u4e86\u4e00\u4e0b\uff0c\u54c8\u54c8\uff0c\u6b63\u5e38\u5e94\u8be5\u662f\u52a0\u5165 init.d \u7684\u670d\u52a1\u4f7f\u7528 service php-fpm relaod                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u6c42\u52a9, \u4fee\u6539\u4e86 PHP .ini,&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/167207"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=167207"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/167207\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=167207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=167207"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=167207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}