fiwswe Wiki

fiwswe's ramblings

User Tools

Site Tools


weblog

Welcome to fiwswe's BLOG

Currently there are 17 entries in this BLOG.

DokuWiki 2024-02-06 "Kaos" has been released

Overall a good release with many internal improvements to the code. But there are a few issues that may cause early adopters some grief. Patches for most of them exist and I'm sure an updated release will include the fixes soon.

Note hat PHP 7.4 or higher is now required. As PHP 7.4 is already out of maintenance / end of life, PHP 8.x is highly recommended. I have had no issues running DokuWiki on PHP 8.2 and 8.3 so far.

So far the most troublesome issues seem to be:

Plugins work fine for the most part in my experience. But many plugins have not had their plugin pages updated to indicate compatibility with "Kaos" yet. And PHP 8 compatibility still needs work for some plugins, though the issues are mostly PHP warnings.

I can't comment much on templates, but sprintDoc Template and of course the built-in DokuWiki Template work fine.

Update 2024.02.12: Less than a week after the initial release, the hotfix version DokuWiki 2024-02-06a "Kaos" has been released, fixing the problems mentioned above. It may still be necessary to invalidate the DokuWiki cache after the update.

2024/02/11 23:23 · fiwswe

OpenBSD 7.4 has been released

Again, not surprising for those who follow the OpenBSD mailing lists, on 2023.10.16 OpenBSD 7.4 was released.

As usual the Upgrade instructions work fine and the first impression is good.

The one thing that might cause issues on some of the servers I administer is the fact that the included LibreSSL 3.8.2 no longer supports TLSv1.0 and TLSv1.1. TLSv1.2 and TLSv1.3 are now the only versions supported. Generally this is good, because the older versions were deprecated 2½ years ago, see RFC 8996 Deprecating TLS 1.0 and TLS 1.1. But there might be issues with IoT devices or even some older computers sending emails. We'll see…

2023/10/18 07:04 · fiwswe

AI?

In recent weeks there seems to have been a huge hype about “AI”.

However from what I can see of the results, “AI” must refer to “Artificial Idiot“ as none of them seem to bear any relation to “Intelligence“.

The only danger I can see is that people will take the output from artificial idiots as gospel. Nothing new there as lots of people listen to human idiots as well.

2023/06/03 22:50 · fiwswe

cron-like execution of PHP code more often than every minute

A friend of mine recently asked me how to modify a PHP script that collects data into an RRDtool database so it could be triggered more often than once per minute. He is currently using cron(8) to trigger the script.

Of course cron(8) has a granularity of 1 minute so there is nothing that can be done there.

The basic solution is to start the script once and have it loop infinitely with each loop iteration performing the action and then waiting until the next time the action should be performed. Thus the run interval can be specified with sub-second precision.

There are a few minor catches though:

  • In order to not use CPU when waiting for the next execution time, the script sleeps (time_sleep_until). However a sleeping process/script can not be signaled to stop. Thus e.g. C will not work until the script wakes from sleep.
    • So the instead of sleeping the script will take short naps of ≤0.5s until the target time has been reached. Thus any signal to the process will take 0.5s at most to be processed.
  • We want the run interval to be constant no matter the actual runtime of the action. In other words, we do not want there to be any significant drift.
    • In case the runtime of the action happens to be longer than than the interval the script should just skip to the next interval. So it makes a best effort at performing the action at each interval but is tolerant if that fails due to time overruns.
  • The script does need to use the PHP pcntl extension for the signal handling code.
    • Please note that this extension is considered to be a potential security risk when used with PHP code that is executed from a web server. So you should make sure that the php.ini used for the web server does not include this extension.
    • For a CLI script, like the one we are talking about here, it is fine though, as long as you take care with the permissions, etc. (which you should in any case).

Explaining all of this to someone who can read and unterstand code, even modify it, but who is not an actual software developer, seemed complicated. So I decided on building some heavily commented sample code to illustrate the concepts and as a potential starting point for useful scripts based on this concept. You can find it here: https://github.com/fiwswe/simpleservice

2023/05/10 08:36 · fiwswe

OpenBSD 7.3 has been released

Not surprising for those who follow the OpenBSD mailing lists, on 2023.04.10 OpenBSD 7.3 was released.

As usual the Upgrade instructions work fine and the first impression is good.

2023/04/11 15:20 · wiki admin

Embedded PHP Plugin

I have published my first DokuWiki plugin: Embedded PHP Plugin

It was created to replace the <php> and <PHP> functionality that was removed in DokuWiki “Jack Jackrum”.

Apart from a learning experience w.r.t. the actual plugin development the publishing part was interesting as well.

  • For example I did not know that GitHub allows for automated downloads of .zip archives using a very generic URL.
  • I also did not know that the name of the top level directory in the .zip archive is automatically replaced with the base name of the plugin during installation.
  • Debugging plugins is a pain! I did my development on a remote machine and the only debugging tools where \dokuwiki\Logger::debug() statements and in rare cases modified HTML output (in the render() method of the plugin). Caching often gets in the way as well.
  • There is no way to test the ---- plugin ---- block at the top of the Embedded PHP Plugin page ahead of time. A special plugin interprets the content and apparently there is a database involved as well.
  • The rest of the Embedded PHP Plugin can be prebuilt and tested in a private wiki. However any links to the https://www.dokuwiki.org website must be set to doku>… on the test site and changed to :… on the real website.
2023/04/08 15:14 · wiki admin

Site creation

After using the moniker fiwswe for some time now, I have decided to have a website for this identity. This is it!

In late 2022 everything came together for this:

  • I found a way to reasonably assure the anonyomity of using the fiwswe alias.
  • I found relatively cheap domain registration, E-Mail, hosting and other services while retaining all technical features I wanted for this private, non-critical, non-commercial website.
  • I had the time and inclination.

Real content will probably arrive irregularly. Do not expect high a volume of content from this website.

→ Read more...

2022/10/29 13:06 · fiwswe
weblog.txt · Last modified: by fiwswe