{"id":1651,"date":"2025-01-18T23:52:36","date_gmt":"2025-01-18T21:52:36","guid":{"rendered":"https:\/\/www.shukko.com\/x3\/?p=1651"},"modified":"2025-01-18T23:52:36","modified_gmt":"2025-01-18T21:52:36","slug":"directadmin-sunucuda-default-php-surumunu-degistirirken-eski-kullanicilarin-php-surumleride-eskisi-halde-birakmak","status":"publish","type":"post","link":"https:\/\/www.shukko.com\/x3\/2025\/01\/18\/directadmin-sunucuda-default-php-surumunu-degistirirken-eski-kullanicilarin-php-surumleride-eskisi-halde-birakmak\/","title":{"rendered":"directadmin sunucuda default php surumunu degistirirken eski kullanicilarin php surumleride eskisi halde birakmak"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>0- durum nasil su an ? kim ne kullaniyor?\negrep php&#91;1,2,3,4]_select= \/usr\/local\/directadmin\/data\/users\/*\/domains\/*.conf\n\n1- once bir sey olmasin aman mevcut durumu yedekle\ntar czvf ~\/domain-conf-backup.tgz \/usr\/local\/directadmin\/data\/users\/**\/domains\/*.conf\n\n2- Force PHP to be version 1 if no default is set\ngrep -rF -L php1_select \/usr\/local\/directadmin\/data\/users\/**\/domains\/*.conf | xargs sed -i.step1 '$ a php1_select=1'\n\n3- \/usr\/local\/directadmin\/options duzenle diledigin gibi\ncd \/usr\/local\/directadmin\/custombuild\n.\/build set php1_release 8.0\n.\/build set php3_release 7.4\n.\/build php\n\n4- Now you want to move all the users who used php1 to use php3, so, you execute this script:\n#!\/bin\/sh\nfor i in `ls \/usr\/local\/directadmin\/data\/users\/*\/domains\/*.conf`; do\n{\n       if ! grep -q ^php1_select $i; then\n               echo php1_select=3 >> $i\n               continue\n       fi\n\n       perl -pi -e \"s\/^php1_select=1\/php1_select=3\/\" $i\n};\ndone\nexit 0\n\n5- Update config files:\ncd \/usr\/local\/directadmin\/custombuild\n.\/build update\n.\/build rewrite_confs<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1651","post","type-post","status-publish","format-standard","hentry","category-kategerisiz"],"_links":{"self":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/comments?post=1651"}],"version-history":[{"count":1,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1651\/revisions"}],"predecessor-version":[{"id":1652,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1651\/revisions\/1652"}],"wp:attachment":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/media?parent=1651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/categories?post=1651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/tags?post=1651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}