PHP Migration Software Strategies Tutorial

PHP Migration Software Strategies Tutorial

PHP Migration Software Strategies Tutorial

It occurred to us today that, in an ongoing sense, with our “post DNS changeover” 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 …

  • fgrep … preemptive approach … and/or …
  • error_log … reactive approach

… to tracking down issues. The fgrep approach has the advantage that you fix issues ahead of the users of the website getting there first. The second error_log approach waits for users (including you) to happen on the problem, and the relevant error_log 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.

The fgrep approach … such as …


fgrep 'getLocation' */*.php | more # motivation for trying came from discovering problem else where in amongst PHP TimeZone code issues

… 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 error_log approach … we’re recommending can be achieved productively via two separated but non-overlapping Terminal app windows, as you can see happening in today’s tutorial animated GIF presentation … can be quite daunting too, but not as bad, in that a lot of PHP has gone to …

  • /home/rjmprogr/public_html/PHP … corresponding to https://www.rjmprogramming.com.au/PHP … and PHP covered by /home/rjmprogr/public_html/PHP/error_log scouring … and some in …
  • /home/rjmprogr/public_html/HTMLCSS … corresponding to https://www.rjmprogramming.com.au/HTMLCSS … and PHP covered by /home/rjmprogr/public_html/HTMLCSS/error_log scouring

… as two places covering a lot of the places where we’ll find any issues.

Of course, it’s not just PHP migration phases of work that can benefit from these two “quite generically useful” approaches, which we’re using a lot, in any case, here at RJM Programming.

If this was interesting you may be interested in this too.

This entry was posted in eLearning, Software, Tutorials and tagged , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *