Virtualmin – Install PHP 8.0 and update all sites

The PHP 8 release is around the corner. This blog post outlines the steps of installing and configuring PHP 8 on an existing install of Virtualmin on a Ubuntu system. It assumes that Virtualmin has already been installed, and that the ondrej/php PPA has been configured on the system.

Install PHP 8.0 (I currently use FPM on my servers):

apt install php8.0-fpm

As of writing, Virtualmin needs to be patched so that it can pick up PHP 8. Apply this one-line change to your server. Then, run Virtualmin’s config check so that it picks up the new PHP version:

virtualmin check-config

The output should say something like the following:

PHP versions have changed to 7.2, 7.4, 8.0 since last check. Regenerating any missing php.ini files.

Then update all the Virtualmin sites to use the new version:

virtualmin modify-web --all-domains --mode fpm --php-version 8.0

There used to be some quirks as to what PHP versions could be used with PHP-FPM, as configured within the Virtualmin panel. However, since the release of the latest Virtualmin 6.13 at the end of October, it seems to have largely resolved these issues.

Side Project 1: Real Time Bus Map in Vancouver

Since TransLink released their new mobile Next Bus site with real-time GPS updates of bus locations, I’ve been trying to find ways to get the data and rehash it into something that  Metro Vancouver transit enthusiasts (more specifically, enthusiasts who chase buses and monitor the transit system’s operation) will find useful.

There were two main shortcomings of TransLink’s site from the viewpoint of a transit enthusiast:

  1. Can’t search for a specific bus.  Often times transit enthusiasts “chase” a particular bus, usually a new bus, a fresh bus after a midlife refurbishment, or a bus with a new advertisement wrap.
  2. Can’t see the entire system as a whole.  This one’s pretty self explanatory.  It’s just fun to be able to see where all the buses are.

So I created a system which gleaned information from the TransLink site and aggregated it into a useful interface which I called “T-Comm”.

This is named after CMBC’s Transit Communications centre which has an interface similar to what I created.  Using the information I was also able to add additional functionality like grabbing the bus’s schedule for the current trip and even the entire day.

Since most transit enthusiasts would be using this on the go, I knew I had to make this site mobile-friendly. The enthusiasts I knew used a myriad of mobile devices including Blackberries, iPhones, and Androids, so it would not have made sense for me to create a native app for each of the platforms; it would have killed me in terms of time and energy.  I chose to use jQuery Mobile and Google Maps API as the basis of the frontend.  The backend is powered by PHP/MySQL. I was amazed at the ease I was able to make something mobile-friendly using jQuery Mobile.  It was actually fun too.  More importantly testers reported positively on their mobile devices.

I’m hoping that TransLink will release the GPS data officially for developers.  They’ve said after April 2012 on Twitter, so I’m crossing my fingers.

Contact me if you would like access to the site.  Since the current site hammers TransLink’s servers I’m trying to tread lightly.  Once official GPS data is used I will open it to the public, but I don’t really see this being used by the public as it is quite enthusiast-oriented.

Update: The site has been updated to use TransLink’s official data feed for real time bus data, so here’s the link: https://tcomm.bustrainferry.com.  More updated info on this project can be found on my T-Comm project info page.

MyBB 1.2 Beta: Translation Manager

Another of my Admin CP addons: The Translation Manager. This is also known as the “Language Packs” section, “Language Editor”, and other variations). It allows administrators with the new permission “Can Manage Languages” to edit each individual language variable in each language file, and also the properties of the language. Below is a screenshot of the main page:

There are two menus for each language. One menu allows you to choose the method of editing the language variables. The other menu allows you to perform operations on the language pack as a whole. Currently the only operation is editing the properties of the language pack, as shown below:

However, the editing of language variables is the best part of this utility. You can either edit languages by itself, or “with another language.” This allows translators (and anyone else) to compare two language packs, for example, the English translation with the translator’s language pack. First, a file must be chosen to be edited:

Below are two screenshots of the editor itself: one in single-mode, and one in dual-mode (comparing English to my test language pack).

I hope this feature will benefit both translators and administrators when editing language files. This makes it easy for any administrator to change the format of the emails, the registration agreement, and any other text in MyBB. Very flexible eh?

A technical note: The language folders and files must be CHMODed so that the web-server can write to it. If the files are not editable, a notice will be shown and administrators will not be able to save their changes.

MyBB 1.2 Beta: Custom Moderation

Custom Moderator Tools are one of the new sections in the Admin Control Panel in MyBB 1.2. Also known as ‘multi-moderation’, this feature allows you to add ‘tools’ to the standard moderator options that allow you to do many moderator actions at the same time. For example, for our beta boards, we have a tool to mark fixed bug threads with a [F] and move it into the appropriate “Fixed Bugs” forum, and also add a reply stating that the bug was fixed. The tools allow moderators to do many actions in one, saving time and effort.

In the Admin CP, administrators can either add a “Post” tool or a “Thread” tool. As you may be able to guess, the Post tool is shown in the Inline Post Moderation options at the bottom of each thread. The “Thread” tools are shown at the bottom of the Inline Thread Moderation options at the bottom of each forum, and also at the bottom of each thread in the Moderation Options menu. As you can see from the screenshots below, there are many options that you may choose to include for each type of tool.

And the custom tools are displayed in an option-group clearly separated at the bottom of the moderator menus:

And yes this feature was the guess-the-feature in one of my previous blog posts.

It took me a while to convert all the moderator actions into a class first so that the custom moderation tools could easily execute them, but I think the work is worth it in the long run, as we can now mark bug threads and suggestion threads on the Community Boards with ease 🙂 and I’m sure many administrators and moderators out there will find it quite useful on their board as well.

MyBB 1.2 Beta: Multi-quoting

I’m going to be posting this series of screenshots in new posts now.

One of the new features of MyBB 1.2 is multi-quoting. This function allows you to select as many posts as you want, from a one or more threads, and have them all ‘pre-quoted’ in the message box when creating a new thread or reply.

The following screenshot shows the postbit. The multi-quote button is the one to the right of the “Reply” button (which was “Quote” before 1.2). (The postbit display of the new reputation system is also shown here)

The screenshot below shows the new reply page with the selected quotations pre-quoted.

Exit mobile version