Saturday May 4th the Forums Will Briefly Break Testing PHP 5.6 to PHP 7.0

On Saturday May 4th the forums will briefly break when I switch our Apache PHP 5.6 module to PHP 7.0.

Previously, I had two sites set up for testing the migration, but for many reasons, the second site has additional issues unrelated to PHP 7.0 so it is hard to debug on a different site and make solid progress.

So, this Saturday when the site is quiet, I will run a2dismod php5.6; a2enmod php7.0 and see what breaks and what logs, and what does not break.

Then, depending on the severity of the breaks, I will turn PHP 5.6 back on with a2dismod php7.0; a2enmod php5.6 , bringing the site back to normal.

I have already made a number of changes in the PHP code in preparation, but I'm sure things will break, the error logs will fill and I'll have more work to do in the next round.

5 Likes

May the fourth be with you :slight_smile:

2 Likes

OK.

The switch from apache module php5.6 to php 7.0 test is done for today.

Results were mixed.

Most of the problems were related to changes in PHP class constructors in the include files.

I started changing them, one at a time, but it became unmanageable, so I need a better approach.

Summary Note:

The major problem was the PHP 5.6 class constructors in the include files need to change to work in PHP7.0 .

We have years of custom code in those include files, so I need strategy to migrate, something like:

  • Edit current PHP5.6 include files and move custom code to custom PHP hooks where feasible.
  • Create a new dev directory by copying the new PHP include files compatible with PHP7.0 over the PHP5.6 files.
  • Add custom PHP hooks to the new include files from the original PHP5.6 files.
  • Add custom PHP code to the new include files from the original PHP5.6 files as required (where custome PHP hooks were not used).
  • Test again on another weekend with the new includes directory so I can easily swap out entire directories during the testing.

Note that viewing the forums, the posts and the thread and most of the pages worked great during the test today. What broke were the PHP class constructors when creating a new thread, a new user, editing a post, updating, etc. That is why we are still at PHP 5.6 :slight_smile:

Also, note that one of our very old Bayesian spam classifier plugins broke with fatal errors, but we do not use that "B8" classifier anymore, so I disabled it and will remove it.

Also, note that the search forms broke (not the overall search function) without PHP errors or warnings and would not accept search terms pass to PHP from the HTML form. I will fix this after all the other upgrades are done, because that error does not throw any PHP errors so it will require custom debug / print variable statements.

Maybe I will try again next weekend. Maybe not :slight_smile:

Wish I was coding new Vue.js features and not doing PHP migration, but that's life. It's not all puppy dogs, chocolate, and roses.

Status:

Saturday May 4th the Forums PHP5.6 to PHP7.0 tests are done for this week. We are back to normal running PHP5.6 until further notice.

1 Like