{"id":2215,"date":"2019-09-23T20:48:16","date_gmt":"2019-09-23T13:48:16","guid":{"rendered":"https:\/\/tino.vn\/?post_type=ht_kb&#038;p=2215"},"modified":"2020-04-18T19:00:33","modified_gmt":"2020-04-18T12:00:33","slug":"huong-dan-su-dung-nhieu-phien-ban-php-tren-directadmin","status":"publish","type":"ht_kb","link":"https:\/\/tino.vn\/blog\/docs\/huong-dan-su-dung-nhieu-phien-ban-php-tren-directadmin\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn s\u1eed d\u1ee5ng nhi\u1ec1u phi\u00ean b\u1ea3n PHP tr\u00ean DirectAdmin"},"content":{"rendered":"<p>DirectAdmin c\u00f3 h\u1ed7 tr\u1ee3 ch\u1ea1y hai phi\u00ean b\u1ea3n PHP c\u00f9ng v\u1edbi nhau. Hi\u1ec7n nay hai phi\u00ean b\u1ea3n PHP ph\u1ed5 bi\u1ebfn nh\u1ea5t l\u00e0 PHP 5.6 v\u00e0 7.0.<\/p>\n<p>Trong b\u00e0i vi\u1ebft n\u00e0y s\u1ebd h\u01b0\u1edbng d\u1eabn c\u00e1c b\u1ea1n s\u1eed d\u1ee5ng CustomBuild \u0111\u1ec3 ch\u1ea1y hai phi\u00ean b\u1ea3n PHP.<\/p>\n<p>Tr\u01b0\u1edbc khi l\u00e0m theo h\u01b0\u1edbng d\u1eabn n\u00e0y, b\u1ea1n c\u1ea7n ph\u1ea3i ch\u1eafc ch\u1eb1n r\u1eb1ng DirectAdmin \u0111ang ch\u1ea1y CustomBuild 2.0. N\u1ebfu kh\u00f4ng ph\u1ea3i nh\u01b0 v\u1eady, vui l\u00f2ng x\u00e1c minh v\u00e0 c\u1eadp nh\u1eadt n\u1ebfu c\u1ea7n.<\/p>\n<h2 id=\"Thay_\u0111\u1ed5i_c\u1ea5u_h\u00ecnh_CustomBuild\"><span id=\"Thay_doi_cau_hinh_CustomBuild\">Thay \u0111\u1ed5i c\u1ea5u h\u00ecnh CustomBuild<\/span><\/h2>\n<p>C\u00f3 hai c\u00e1ch \u0111\u1ec3 thay \u0111\u1ed5i c\u1ea5u h\u00ecnh CustomBuild: s\u1eed \u0111\u1ed5i tr\u1ef1c ti\u1ebfp file\u00a0<strong>option.conf<\/strong>\u00a0ho\u1eb7c s\u1eed d\u1ee5ng l\u1ec7nh. Trong h\u01b0\u1edbng d\u1eabn n\u00e0y, ch\u00fang t\u00f4i s\u1ebd s\u1eed d\u1ee5ng d\u00f2ng l\u1ec7nh.<\/p>\n<p>\u0110\u1ec3 thi\u1ebft l\u1eadp hai phi\u00ean b\u1ea3n PHP 5.6 v\u00e0 7.0, \u0111\u1ea7u ti\u00ean h\u00e3y \u0111i\u1ec1u h\u01b0\u1edbng \u0111\u1ebfn th\u01b0 m\u1ee5c CustomBuild:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">cd \/usr\/local\/directadmin\/custombuild<\/pre>\n<h2 id=\"Thi\u1ebft_l\u1eadp_c\u00e1c_phi\u00ean_b\u1ea3n_PHP\"><span id=\"Thiet_lap_cac_phien_ban_PHP\">Thi\u1ebft l\u1eadp c\u00e1c phi\u00ean b\u1ea3n PHP<\/span><\/h2>\n<p>Ch\u1ea1y c\u00e1c l\u1ec7nh sau \u0111\u00e2y \u0111\u1ec3 thi\u1ebft l\u1eadp c\u00e1c phi\u00ean b\u1ea3n PHP:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">.\/build set php1_mode mod-fpm \r\n.\/build set php2_mode php-fpm \r\n.\/build set php1_release 7.2 \r\n.\/build set php2_release 5.6<\/pre>\n<p><em>L\u01b0u \u00fd: S\u1eed d\u1ee5ng thi\u1ebft l\u1eadp nh\u01b0 tr\u00ean, c\u1ea3 hai phi\u00ean b\u1ea3n PHP s\u1ebd \u0111\u01b0\u1ee3c ch\u1ea1y trong ch\u1ebf \u0111\u1ed9\u00a0<strong>php-fpm<\/strong>. \u0110i\u1ec1u n\u00e0y l\u00e0 c\u1ea7n thi\u1ebft n\u1ebfu b\u1ea1n \u0111ang s\u1eed d\u1ee5ng m\u1ed9t\u00a0proxy Nginx v\u00e0 Apache. N\u1ebfu b\u1ea1n kh\u00f4ng s\u1eed d\u1ee5ng proxy, b\u1ea1n c\u00f3 th\u1ec3 thay \u0111\u1ed5i ch\u1ebf \u0111\u1ed9 PHP n\u1ebfu c\u1ea7n.<\/em><\/p>\n<p>M\u1edf t\u1eadp tin option.conf:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">vi option.conf<\/pre>\n<p>X\u00e1c minh c\u00e1c th\u00f4ng s\u1ed1 thi\u1ebft l\u1eadp phi\u00ean b\u1ea3n PHP \u0111\u00e3 ch\u00ednh x\u00e1c nh\u01b0 sau:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">php1_release=7.0 \r\nphp1_mode=php-fpm \r\nphp2_release=5.6 \r\nphp2_mode=php-fpm<\/pre>\n<p>N\u1ebfu kh\u00f4ng, xin h\u00e3y ch\u1ea1y l\u1ea1i c\u00e1c l\u1ec7nh \u1edf tr\u00ean.<\/p>\n<h2 id=\"Bi\u00ean_d\u1ecbch_l\u1ea1i_PHP\"><span id=\"Bien_dich_lai_PHP\">Bi\u00ean d\u1ecbch l\u1ea1i PHP<\/span><\/h2>\n<p>Bi\u00ean d\u1ecbch l\u1ea1i PHP v\u00e0 rewrite c\u1ea5u h\u00ecnh:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">.\/build php n \r\n.\/build rewrite_confs<\/pre>\n<p>Qu\u00e1 tr\u00ecnh bi\u00ean d\u1ecbch c\u00f3 th\u1ec3 m\u1ea5t th\u1eddi gian d\u00e0i, \u0111\u1ea3m b\u1ea3o kh\u00f4ng c\u00f3 s\u1ef1 c\u1ed1 khi\u1ebfn qu\u00e1 tr\u00ecnh b\u1ecb gi\u00e1n \u0111o\u1ea1n. T\u1ed1t nh\u1ea5t b\u1ea1n n\u00ean ch\u1ea1y c\u00e1c l\u1ec7nh trong\u00a0<strong>screen<\/strong>\u00a0v\u00e0 tho\u00e1t kh\u1ecfi phi\u00ean l\u00e0m vi\u1ec7c trong khi qu\u00e1 tr\u00ecnh \u0111ang ch\u1ea1y trong tr\u01b0\u1eddng h\u1ee3p k\u1ebft n\u1ed1i SSH c\u1ee7a b\u1ea1n b\u1ecb ng\u1eaft k\u1ebft n\u1ed1i ho\u1eb7c b\u1ecb gi\u00e1n \u0111o\u1ea1n.<\/p>\n<h2 id=\"Thay_\u0111\u1ed5i_phi\u00ean_b\u1ea3n_PHP\"><span id=\"Thay_doi_phien_ban_PHP\">Thay \u0111\u1ed5i phi\u00ean b\u1ea3n PHP<\/span><\/h2>\n<p>B\u00e2y gi\u1edd b\u1ea1n c\u00f3 th\u1ec3 ch\u1ecdn m\u1ed9t phi\u00ean b\u1ea3n PHP cho m\u1ed7i trang web.\u00a0T\u1ea5t c\u1ea3 c\u00e1c trang web hi\u1ec7n \u0111ang ch\u1ea1y tr\u00ean m\u00e1y ch\u1ee7 DirectAdmin c\u1ee7a b\u1ea1n s\u1ebd s\u1eed d\u1ee5ng phi\u00ean b\u1ea3n PHP \u0111\u1eb7t cho\u00a0<strong>php1_release<\/strong>. \u0110\u1ec3 thay \u0111\u1ed5i phi\u00ean b\u1ea3n PHP cho m\u1ed7i trang web, \u0111\u0103ng nh\u1eadp v\u00e0o DirectAdmin \u1edf c\u1ea5p ng\u01b0\u1eddi d\u00f9ng, nh\u1ea5n Domain Setup, ch\u1ecdn t\u00ean mi\u1ec1n c\u1ea7n thay \u0111\u1ed5i phi\u00ean b\u1ea3n PHP v\u00e0 k\u00e9o xu\u1ed1ng d\u01b0\u1edbi. Nh\u01b0 th\u1ec3 hi\u1ec7n trong h\u00ecnh b\u00ean d\u01b0\u1edbi, b\u00e2y gi\u1edd b\u1ea1n c\u00f3 th\u1ec3 ch\u1ecdn m\u1ed9t phi\u00ean b\u1ea3n PHP. L\u01b0u \u00fd sau khi thay \u0111\u1ed5i phi\u00ean b\u1ea3n PHP, c\u00f3 th\u1ec3 m\u1ea5t \u0111\u1ebfn 1 ph\u00fat \u0111\u1ec3 x\u1eed l\u00fd thay \u0111\u1ed5i.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/09\/UCScreenshot20191124113422.png\"><img decoding=\"async\" class=\"alignnone wp-image-3071 size-full\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/09\/UCScreenshot20191124113422.png\" alt=\"\" width=\"1254\" height=\"908\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/09\/UCScreenshot20191124113422.png 1254w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/09\/UCScreenshot20191124113422-300x217.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/09\/UCScreenshot20191124113422-768x556.png 768w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2019\/09\/UCScreenshot20191124113422-1024x741.png 1024w\" sizes=\"(max-width: 1254px) 100vw, 1254px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>DirectAdmin c\u00f3 h\u1ed7 tr\u1ee3 ch\u1ea1y hai phi\u00ean b\u1ea3n PHP c\u00f9ng v\u1edbi nhau. Hi\u1ec7n nay hai phi\u00ean b\u1ea3n PHP ph\u1ed5 bi\u1ebfn nh\u1ea5t l\u00e0 PHP 5.6 v\u00e0 7.0. Trong b\u00e0i vi\u1ebft n\u00e0y s\u1ebd h\u01b0\u1edbng d\u1eabn c\u00e1c b\u1ea1n s\u1eed d\u1ee5ng CustomBuild \u0111\u1ec3 ch\u1ea1y hai phi\u00ean b\u1ea3n PHP. Tr\u01b0\u1edbc khi l\u00e0m theo h\u01b0\u1edbng d\u1eabn n\u00e0y, b\u1ea1n c\u1ea7n ph\u1ea3i ch\u1eafc [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":2216,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"tags":[],"ht_kb_category":[23],"class_list":["post-2215","ht_kb","type-ht_kb","status-publish","format-standard","has-post-thumbnail","hentry","ht_kb_category-control-panel-direct-admin"],"_links":{"self":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/ht_kb\/2215","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/ht_kb"}],"about":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/comments?post=2215"}],"version-history":[{"count":0,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/ht_kb\/2215\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media\/2216"}],"wp:attachment":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media?parent=2215"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/tags?post=2215"},{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/ht_kb_category?post=2215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}