Wednesday, December 28, 2016

When the phpBB 3 upgrade fails with 500 Internal Server Error

Today I migrated two phpBB 2 forums to phpBB 3. The first went perfectly smoothly with no unexpected messages at all. The second had a couple apparently non-fatal warnings, but then in the middle of the database upgrade process it just halted with an HTTP 500 error. I could get no useful information out of the log. After hours of fiddling and refreshing and Googling, I found that some posts in the old database were tripping up the parser.

To figure out exactly which ones were problematic, I went into the new database and got the maximum post ID out of the posts table. I then queried for the posts in the old database with an ID starting a little bit before that number. Sure enough, one a little after the last successfully migrated post was insanely long with a bunch of weird markup. After replacing its content with a little note about why I had to remove it, the updater continued successfully!

Tuesday, December 27, 2016

Students can get AutoDesk products for free

AutoDesk makes software for architects, engineers, manufacturers, and animators. For example, they're the company behind 3ds Max, the powerful 3D modeling and animation program. I had heard of their products, but until recently I didn't know I could actually get them.

If you're a student with a .edu address, they let you have quite a bit of their software for free for three years for educational purposes. Visit their education section for more information and to install the software.

Monday, December 26, 2016

Policy Plus - Remember the last settings

If you open an alternate ADMX source, it's likely that you want to continue using it in future launches of Policy Plus. Before, Policy Plus just opened the default PolicyDefinitions folder and the normal local GPOs at startup. Today I added a little configuration manager to read and write settings from the Registry. At startup, Policy Plus loads the last ADMX source and policy sources. The ADMX source setting is updated whenever a full new source is opened; the policy source settings are updated when the policies are saved.

Sunday, December 25, 2016

Batch-like wildcards in PowerShell

Several commands and utilities used in batch scripting take filename filters that use * and ? as wildcards for multiple characters and exactly one character, respectively. In PowerShell, that kind of matching can be done with the -like operator, but it has a couple extra features (e.g. # for a numeric character) that make it not match batch behavior exactly. Therefore, to use it on arbitrary filters and get it to work like classic batch, you should first escape some characters in the filter:

$input -like ($filter.Replace('[', '[[]').Replace('#', '[#]'))

Based on my Super User answer.

Saturday, December 24, 2016

AbiathRPC - Little bugs

While combing through AbiathRPC, I found a couple small bugs which are now fixed.

First, authentication wasn't actually being checked in the WCF method that updates a batch of tiles. Fixed by adding the appropriate login-checking call.

The Abiathar client with the AbiathRPC state wrapper would crash when updating tiles when not connected to a server. This was caused by the replacement state wrapper trying to submit updates from a list that didn't exist to a server that didn't exist. Fixed by checking that there's actually an RPC connection and stopping with the vanilla behavior if there's not.

(Also, merry Christmas from Abiathar - from now until sometime tomorrow night, the Abiathar splash screen is Christmas-themed.)

Friday, December 23, 2016

The surprising OWNER RIGHTS principal

Windows has a security principal called OWNER RIGHTS. Like several other all-caps principals, it doesn't apply to anyone in particular. It defines the access that the owner of the object is given even if not otherwise allowed. The surprising part is that the mere presence of an access control entry for this principal blows away the default rights granted to the owner (the ability to read and write the access control list). If you add an entry for this principal with no permissions, being the owner is no longer special other than in that the file size counts against the owner's disk quota.

Thursday, December 22, 2016

What does the Distributed Link Tracking Client service do?

Windows is surprisingly good at keeping track of files that have shortcuts pointing to them. If you move a shortcut target to somewhere on the same volume, using the shortcut will find the target file by its NTFS object ID. You wouldn't even know anything had happened in the background.

If you move a file across volumes, though, it's object identifier changes. (Check this with the fsutil utility.) Yet somehow Windows still manages to find the file if it's pointed to by a shortcut! This is the work of the Distributed Link Tracking Client. You can test this by stopping the DLTC, moving a target across drives, and trying to use the shortcut - it'll be broken.

On a standalone machine, the DLTC keeps an eye on file movements to repair shortcuts. On a domain, it reports to the domain controller, which stores the movement information in the Active Directory to help all client computers find files on the network.

Based on my Super User answer.