How to suppress PHP warnings generated by Piwigo when running PHP 8.x

Are you running Piwigo on a server running PHP 8.x? Is your error_log file in your gallery quickly filling up with PHP warnings? If so, follow these steps to suppress those warnings:

  • Log in to your Piwigo gallery.
  • Click Administration. (This guide assumes your account has Webmaster rights.)
  • Click Plugins on the left-hand menu.
  • Click Add a new plugin.
  • Click in the Search field, type “localfiles” (minus quotes), and press Enter.
  • Under the LocalFiles Editor result, click Add.
  • Click Plugins on the left-hand menu.
  • Toggle the LocalFiles Editor plugin on if it isn’t already
  • Click the Settings button under the LocalFiles Editor item.
  • Copy and paste the following code into the local/config/config.inc.php file:
$conf['show_php_errors'] = E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_WARNING;
  • Click Save File.

Original source: https://piwigo.org/forum/viewtopic.php?id=31875

Making PowerShell talk

Here are a few basic lines of PowerShell code to get your computer to talk to you.

Add-Type -AssemblyName System.speech

$speak = New-Object System.Speech.Synthesis.SpeechSynthesizer

$speak.Speak("Hello world")

It’s simple code, but it makes my children smile.

You can quickly launch PowerShell on most Windows computers by right-clicking the Start button and clicking Windows PowerShell.

Warning: Attempt to read property “post_type” on null – Issue resolved

Was a real headache fixing the issue where I’d go to make a new post and would get a slew of errors like this:

Warning: Attempt to read property "post_type" on null in /REDACTED/wp-includes/post.php

Ended up being a simple enough fix: When importing the database using phpMyAdmin, I had to uncheck the Do not use AUTO_INCREMENT for zero values option under the Format-specific options section.

WPG2 and Social Connect plugins disabled after security review

I’ve disabled two WordPress plugins that are no longer being maintained after an extensive security review of the site.

Specifically, I’ve disabled the WPG2 plugin, which integrated Gallery2 and WordPress, and Social Connect, which allowed visitors to log in to the site using social media accounts.

Most site content will still display without any issues, but some content related to these two plugins may be unavailable or non-functional.

A request from a parent as we approach Christmas

Before I make my request, I’d like to make it abundantly clear that I consider myself immensely blessed. I thank God for my wife, my children, my home, and our health. I am also grateful that my children are growing up near their grandparents and extended family.

I also want to share regarding our circumstances to set the context for my request: My wife and I both work outside the home full-time, but do our best to make time to spend with our children. We have both chosen to prioritize our family over our careers. We have never regretted that decision. We are blessed with steady employment and we are grateful to be able to provide for our family.

Continue reading

Heartbreak – Five years on

Five years ago, my wife and I lost our second child to miscarriage. Seventeen days later, I wrote a post entitled “Heartbreak.” I haven’t written anything longer than a Facebook status update or reply on the subject in the years since, but that should not be misconstrued as willfully ignoring the loss or trying to gloss over it. The pain today is more muted than immediately following the loss, but, as I suspected then, one never truly “gets over” such a significant loss.

Continue reading