The Chyrp install has received an upgrade. To be very honest, I love this blogging platform, and while Wordpress is pretty and socially acceptable, and I have another instance of it on this server, this is where all of the real work gets done.

Our wonderful Chyrp development team had rolled out a new version and  I was very excited to upgrade. I was meticulous with the directions and  I will detail that in the next post. However, there is a simple syntax  error that I have corrected on my side, and I am waiting for the pull  request to go through on GitHub so no others have to go through what I  did.

TL;DR: Edit includes/lib/JSONFeed.php on line 49 and remove the ending semicolon to get your site working again.

You will want to know this: the tool that I used to finally locate the syntax error was parallel-lint by Jakub Onderka, and it does exactly what it says on the tin. Very  nice, actually, since the release just occurred, and I realised that I  probably wouldn't get help anytime soon since this isn't anyone's  primary job, and you can't expect them to, really.

I work in the support business, so I know what it's like. But this tool is one that I am certainly keeping in my arsenal on annwn, and will possibly replicate it over on straylight.

The command and output looked like this:


wirehead@annwn$ ./parallel-lint -p php7.0 -e php -j 10 /path/to/chyrp/*
PHP 7.0.30 | 10 parallel jobs
....................X.......................................  60/338 (17 %)
............................................................ 120/338 (35 %)
............................................................ 180/338 (53 %)
............................................................ 240/338 (71 %)
............................................................ 300/338 (88 %)
......................................                       338/338 (100 %)
Checked 338 files in 1.7 seconds
Syntax error found in 1 file
Parse error: /path/to/chyrp/includes/lib/JSONFeed.php:49
47|                 "title"         => strip_tags($title),
48|                 "home_page_url" => url("/", MainController::current()),
49|                 "feed_url"      => unfix(self_url());
50|             );
51|
Unexpected ';', expecting ')' in /path/to/chyrp/includes/lib/JSONFeed.php on line 49

When you find things like this, be cool and help a brotha out when you see your minor solutions are helpful. Submit a pull request and save the dev team headaches. They have enough to worry about  actually planning and coding the thing, so every little thing you can  fix and save them heartache and lost time over is always helpful.

Also, take the time to debug your own crap. Don't always assume that  because someone else wrote it, they have the time to hunt backwards and  debug everything. They have kids and partners and real jobs, too. And  even possibly a real life. If you're using it, you're at least a little  part of the team. That's what open source is about, anyway.

I learned a hell of a lot in two hours. That's productive.

I learned:

  • how to export a MySQL database properly to a text file from the command line
  • the correct methodology for upgrading the Chyrp Lite blog system in place
  • how to debug php when it doesn't work
  • how to properly edit and submit a pull request on GitHub