{"id":71,"date":"2016-11-19T00:42:29","date_gmt":"2016-11-18T21:42:29","guid":{"rendered":"https:\/\/ben.semihkiroglu.com.tr\/blog\/?p=71"},"modified":"2016-11-19T00:42:29","modified_gmt":"2016-11-18T21:42:29","slug":"ayni-sunucuda-farkli-surum-php-cli-kullanimi","status":"publish","type":"post","link":"https:\/\/semih.kiroglu.net\/blog\/ayni-sunucuda-farkli-surum-php-cli-kullanimi\/","title":{"rendered":"Ayn\u0131 Sunucuda Farkl\u0131 S\u00fcr\u00fcm PHP CLI Kullan\u0131m\u0131"},"content":{"rendered":"<p>Merhabalar. K\u0131sa ve \u00f6z olacak yaz\u0131m\u0131 neden yazmaya gerek duydu\u011fumu anlatarak ba\u015flayay\u0131m konuya. Bir projem i\u00e7in CentOS y\u00fckl\u00fc production sunucumda composer kullanarak ba\u011fl\u0131l\u0131klar\u0131 y\u00fcklemem gerekliydi. Sunucumda Plesk \u00e7al\u0131\u015f\u0131yordu ve istedi\u011fim site i\u00e7in farkl\u0131 PHP s\u00fcr\u00fcmleri se\u00e7ip o site i\u00e7in se\u00e7ili PHP s\u00fcr\u00fcm\u00fc kullanabiliyordum. Fakat PATH&#8217;e tan\u0131ml\u0131 olan php s\u00fcr\u00fcm\u00fc 5.3.3 idi ve composer kullanaca\u011f\u0131m uygulama en az PHP 5.6 istiyordu. Bunu \u00e7\u00f6zmek i\u00e7in \u015fu sat\u0131r\u0131 uygulad\u0131m:<\/p>\n<pre class=\"prettyprint\">env PATH=\"\/opt\/plesk\/php\/5.6\/bin:$PATH\" composer install<\/pre>\n<p>Bu komutun amac\u0131 \u00f6zetle; composer install komutunun, sadece bu seferlik, PATH=&#8221;\/yol\/&#8221; ile belirtilen yoldaki PATH de\u011ferleri ile \u00e7al\u0131\u015fmas\u0131n\u0131 sa\u011flamakt\u0131r.<\/p>\n<p><!--more--><\/p>\n<p>\u00d6rnekleyecek olursak:<\/p>\n<pre class=\"prettyprint\">php -v<\/pre>\n<p>komutu size; PHP 5.3.3 (CLI) &#8230; sat\u0131r\u0131n\u0131 d\u00f6nd\u00fcr\u00fcyorsa,<\/p>\n<pre class=\"prettyprint\">env PATH=\"\/opt\/plesk\/php\/5.6\/bin:$PATH\" php -v<\/pre>\n<p>komutu; PHP 5.6.x (CLI) &#8230; sat\u0131r\u0131n\u0131 d\u00f6nd\u00fcrecektir. Tekrar php -v komutu girdi\u011finizde ise 5.3.3 CLI&#8217;\u0131 sizi kar\u015f\u0131layacakt\u0131r.<\/p>\n<p>&nbsp;<\/p>\n<p>Ben \u00e7al\u0131\u015ft\u0131ramad\u0131m fakat tamamen PATH de\u011fi\u015ftirmek isterseniz \u015fu komutu uygulayabilece\u011finiz iddia ediliyor:<\/p>\n<pre class=\"prettyprint\">set PATH=\"\/diger\/php\/surum\/yolu\/bin:$PATH\"<\/pre>\n<p>&nbsp;<\/p>\n<p>Akla d\u00fc\u015ft\u00fck\u00e7e, yazmaya devam. Kendinize iyi bak\u0131n \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Merhabalar. K\u0131sa ve \u00f6z olacak yaz\u0131m\u0131 neden yazmaya gerek duydu\u011fumu anlatarak ba\u015flayay\u0131m konuya. Bir projem i\u00e7in CentOS y\u00fckl\u00fc production sunucumda composer kullanarak ba\u011fl\u0131l\u0131klar\u0131 y\u00fcklemem gerekliydi. Sunucumda Plesk \u00e7al\u0131\u015f\u0131yordu ve istedi\u011fim site i\u00e7in farkl\u0131 PHP s\u00fcr\u00fcmleri se\u00e7ip o site i\u00e7in se\u00e7ili PHP s\u00fcr\u00fcm\u00fc kullanabiliyordum. Fakat PATH&#8217;e tan\u0131ml\u0131 olan php s\u00fcr\u00fcm\u00fc 5.3.3 idi ve composer kullanaca\u011f\u0131m uygulama en az PHP 5.6 istiyordu. Bunu \u00e7\u00f6zmek i\u00e7in \u015fu sat\u0131r\u0131 uygulad\u0131m: env PATH=&#8221;\/opt\/plesk\/php\/5.6\/bin:$PATH&#8221; composer install Bu komutun amac\u0131 \u00f6zetle; composer install komutunun, sadece bu seferlik, PATH=&#8221;\/yol\/&#8221; ile belirtilen yoldaki PATH de\u011ferleri ile \u00e7al\u0131\u015fmas\u0131n\u0131 sa\u011flamakt\u0131r.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7,3],"tags":[12,14,15,16,19,28,32,40],"class_list":["post-71","post","type-post","status-publish","format-standard","hentry","category-php","category-web-teknolojileri","tag-centos","tag-cli","tag-compoer","tag-degistirme","tag-farki","tag-linux","tag-php","tag-surum"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/posts\/71","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/comments?post=71"}],"version-history":[{"count":0,"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/posts\/71\/revisions"}],"wp:attachment":[{"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/media?parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/categories?post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/tags?post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}