{"id":64658,"date":"2024-09-13T03:01:00","date_gmt":"2024-09-12T17:01:00","guid":{"rendered":"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=64658"},"modified":"2024-09-16T08:45:04","modified_gmt":"2024-09-15T22:45:04","slug":"php-migration-software-strategies-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-migration-software-strategies-tutorial\/","title":{"rendered":"PHP Migration Software Strategies Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/fgrep_error_log.gif\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"PHP Migration Software Strategies Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/fgrep_error_log.gif\" title=\"PHP Migration Software Strategies Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">PHP Migration Software Strategies Tutorial<\/p><\/div>\n<p>It occurred to us today that, in an ongoing sense, with our &#8220;post DNS changeover&#8221; phase of operations, we predominantly have two approaches to progressing our cause of migrating (what used to be CentOS hosted) PHP (starting with a 5) code to (what is now AlmaLinux hosted) PHP (starting with an 8) new working codebase, those being &#8230; <\/p>\n<ul>\n<li><i>fgrep<\/i> &#8230; preemptive approach &#8230; and\/or &#8230;<\/li>\n<li><i>error_log<\/i> &#8230; reactive approach<\/li>\n<\/ul>\n<p> &#8230; to tracking down issues.  The <i>fgrep<\/i> approach has the advantage that you fix issues ahead of the users of the website getting there first.   The second <i>error_log<\/i> approach waits for users (including you) to happen on the problem, and the relevant <i>error_log<\/i> you get on most Apache web servers can help out tracking down where PHP code, that is actively used, is having issues, giving line numbers to help you (the programmer) nut out what might be happening.<\/p>\n<p>The <i>fgrep<\/i> approach &#8230; such as &#8230;<\/p>\n<p><code><br \/>\nfgrep 'getLocation' *\/*.php | more   # motivation for trying came from discovering problem else where in amongst PHP TimeZone code issues<br \/>\n<\/code><\/p>\n<p> &#8230; has the disadvantage of being quite daunting for us, and with the changes in MacBook arrangements over the years, not always the way to go here, at least for us.  The second <i>error_log<\/i> approach &#8230; we&#8217;re recommending can be achieved productively via two separated but non-overlapping Terminal app windows, as you can see happening in today&#8217;s <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/fgrep_error_log.gif\" rel=\"noopener\">tutorial animated GIF presentation<\/a> &#8230; can be quite daunting too, but not as bad, in that a lot of PHP has gone to &#8230;<\/p>\n<ul>\n<li>\/home\/rjmprogr\/public_html\/PHP &#8230; corresponding to https:\/\/www.rjmprogramming.com.au\/PHP &#8230; and PHP covered by \/home\/rjmprogr\/public_html\/PHP\/error_log scouring &#8230; and some in &#8230;<\/li>\n<li>\/home\/rjmprogr\/public_html\/HTMLCSS &#8230; corresponding to https:\/\/www.rjmprogramming.com.au\/HTMLCSS &#8230; and PHP covered by \/home\/rjmprogr\/public_html\/HTMLCSS\/error_log scouring<\/li>\n<\/ul>\n<p> &#8230; as two places covering a lot of the places where we&#8217;ll find any issues.<\/p>\n<p>Of course, it&#8217;s not just PHP migration phases of work that can benefit from these two &#8220;quite generically useful&#8221; approaches, which we&#8217;re using a lot, in any case, here at RJM Programming.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d64658' onclick='var dv=document.getElementById(\"d64658\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/migration\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d64658' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>It occurred to us today that, in an ongoing sense, with our &#8220;post DNS changeover&#8221; phase of operations, we predominantly have two approaches to progressing our cause of migrating (what used to be CentOS hosted) PHP (starting with a 5) &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-migration-software-strategies-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,33,37],"tags":[85,218,307,2570,2457,1929,395,417,3061,707,2117,932,997,1166,1252,1319,1583],"class_list":["post-64658","post","type-post","status-publish","format-standard","hentry","category-elearning","category-software","category-tutorials","tag-apache","tag-code","tag-debugging","tag-edit","tag-editing","tag-error","tag-error_log","tag-fgrep","tag-line-number","tag-linux","tag-migration","tag-php","tag-programming","tag-software-2","tag-terminal","tag-tutorial","tag-window"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/64658"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=64658"}],"version-history":[{"count":7,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/64658\/revisions"}],"predecessor-version":[{"id":64685,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/64658\/revisions\/64685"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=64658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=64658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=64658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}