One of the oft-overlooked aspects of PHP is that you can write scripts in PHP to execute from the command line. I fell into the habit of writing data munging scripts in Perl, and web pages using PHP; I realized I was keeping alive two types of code needlessly.

How do you do this on a Linux machine? Let’s say you have a script called make-ducks.php

First, find out where your PHP engine is:

whereis php

You’ll get back an answer that looks something like this:

php: /usr/local/bin/php /usr/local/lib/php /usr/local/lib/php.ini

The /usr/local/bin/php is your PHP engine. Now simply insert the following at the top of a PHP script you want to run from the command line:

#!/usr/local/bin/php -q

Make sure this is the first line in your PHP script. You can then leave everything else in the PHP script as you would have it otherwise. Mark the PHP script as executable:

chmod +x make-ducks.php

Now you can go ahead and run the script like it was a regular Linux command:

./make-ducks.php

The only difference is that output that normally goes to the browser, including error messages, will now be printed in your terminal window.

Neato!

Big news on the Formosa front: the couple that runs the venerable University Ave. restaurant in Charlottetown has purchased the former Big Mommas location on Prince Street, all 3000 square feet of it, and plans to either move there entirely, or keep the existing location open and open a new branch there. The menu will be expanded on Prince St., and they plan to open one floor to start, with others to follow. Expect an opening date of next spring.

Let’s hope they can break through the curse on that building: it’s been so many restaurants, from so many owners, over the time we’ve been on the Island that we’ve stopped counting (and, a couple of owners ago, stopped going, just because we expected the worst). Apparently this isn’t a new curse, either: I talked to someone today who’s got 15 years on me, and he said the same has been true all his life as well.

If anyone can make that location work, it will be the tenacious couple at the Formosa. Here’s hoping they make a good go of it; I know that our family will be regular and enthusiastic customers there, especially as they’ll be only 2 blocks from our house.

Amazing, isn’t it, the explosion and success of interesting food in Charlottetown in the past year. I remember reading a fantastic column by Len Russo in the Eastern Graphic several years back: he was writing about the arrival of the Just Juicin’ juice bar to Queen St., and compared it to the arrival of pizza on the Island in the early 1970s in importance and earth-shakingness. I think we’re into another quake now.

I really miss Len’s column in the Graphic; he’s a fantastic writer, one of the best columnists I’ve ever read regularly. Our loss in Canadian Tire’s gain.

This week our Canadian neighbours celebrate Thanksgiving while our American cousins celebrate Columbus Day. And, what’s more, the leaves, on both sides of the border, are changing colours, so the so-called “leaf-peeping season” is in full swing, especially south of the border (leaves, it seems, aren’t such a big deal here in Canada).

While the tourism season ended on Prince Edward Island almost two months ago, after Old Home Week in mid-August, there’s a huge fall tourism market (see Seasons, an excellent, beautiful new product from my colleagues in New Hampshire at YANKEE).

I’m off at the crack of dawn tomorrow morning to spend a week in New England; as a direct result of the leaf craze there, I couldn’t find a hotel, B&B or other room to save my soul within 50 miles of rural, leaf-drenched Dublin, New Hampshire.

Fortunately, my friend, and former YANKEE, Lida, who swapped houses with us last summer, came to my rescue and hooked me up with two friends of hers from leaf-drenched Harrisville, NH (home of Harrisville Designs, for you spinners and weavers in the readership), so that is where I’ll be based from tomorrow evening until the end of next week.

The irony is that in this most colourful of seasons, I’ll be spending most of the next three days readying a couple of new servers for installation at new colocation facility, totally unmindful of the leafy heaven swirling outside. I’m just thankful to have found a place to rest my head at night.

I’m still searching for someplace to spend a couple of nights in Boston on the flip side of my trip; rooms seem to be tight and expensive, so something must be going on there that weekend.

Back in town on Sunday, Oct. 19. Take care of the Island for me; regular updates from the road to follow.

Here’s a recent note from the CBC’s Corrections Page:

In a news story on September 27 about the earthquake in Japan, CBC News Online said “Hokkaido is home to 16,000 people.” The population of Hokkaido is actually closer to 5.6 million.

Here’s a great page that gives details and pictures of the studio that Christopher Lydon uses to record his excellent audio interviews.

From CBC Prince Edward Island comes this perplexing story:

Canada’s four Atlantic provinces will have to pay back millions of dollars in health, social and equalization transfers to Ottawa following the discovery that more than one per cent of the people thought to be living in the region are gone.

Emphasis is mine.

Our take-no-prisoners babysitter Emily is part of a plan to purchase a new grand piano for the Beaconsfield Carriage House. Emily is the Dean Kamen of high culture in Charlottetown; it’s hard to resist her energy. If you’re Beaconsfield supporter, or enough the kind of culture that gathers around a grand piano, you would do well to support her mini-fundraising drive. I’m sure Beaconsfield can probably tell you where to send your cash.

Kudos to Bob Young for investing in Charlottetown’s downtown. We will be regular, devoted customers of his new hardware store.

Will Pate phoned me tonight and asked me to take a look at this CityFilter post about TownSquare.ca, and perhaps to post a response.

I started to write a well-considered review of my feelings, when it suddenly dawned on me that I was falling prey to the TownSquare time-sucking vortex, and I couldn’t waste my time paying attention to something that, in the end, is irrelevant, both to me, and to most of my fellow citizens.

Yes, the TownSquare.ca portal is ugly, expensive, poorly organized, and generally ill-regarded by anyone who lives on the webside.

But it is a product of bureaucrats who were charged with creating the sort of project — a “regional portal” — that hasn’t been warmly received by the web intelligentsia for 5 or 6 years. TownSquare.ca is ugly and poorly organized because nobody with any sense would spend any time on a project which, in the end, doesn’t actually make any sense in the first place.

The Emperor has no clothes. Do you really expect talented tailors, with plenty of other interesting, compelling garments on their sewing tables, to spend any energy either pointing this out, or trying in vain to stitch some up?

The blame for this irrelevance doesn’t lie on any one person, or even on the project team. Bureaucracies, by and large, are incapable of creating beautiful, well-organized, information systems; it’s simply not in their nature. Perhaps the real irony is that the sort of muddled brown fuzzy-headed vibe that TownSquare.ca reflects is a pretty decent reflection of the bureacractic systems that brought it to life.

TownSquare.ca was inevitable, and nothing anyone said or did could have prevented either its conception or birth nor its necessary uselessness. It doesn’t make any sense to try and forensically audit it, either conceptually or monetarily, because there’s not much more to it than that.

The saving grace of the project, as I’ve pointed out before, is that several excellent, worthwhile projects have managed to exist under the same umbrella. For that we can take some solace.

In a few years, when the money runs out, TownSquare.ca will quietly fade away. We probably won’t even notice. It’s a shame that we could have planted some more trees, or built better playgrounds, or even had a big party, with the money that was wasted otherwise. But let’s not user more of our energies pointing out the folly, when they are better spent doing the things that we actually think need to be done to virtually enhance our communities.

To do otherwise is to let the ugliness envelope us further. And that’s not healthy.

Ivan Dowling — actor, professor, singer, gadabout — writes in response to my earlier post about Catherine Hennessey’s birthday party, in part:

You mentioned that I had done a dance after my song. I presume you were referring to the second picture of me where I was curtsying at the end. I had just finished singing “Alice Blue Gown” , which to my embarassment my parents had me sing on radio 66 years ago. It describes the pride of a GIRL!! named Alice who had just displayed in public her new blue gown. As soon as I work up a dance to go with the song I’ll have my agent get in touch.

Apologies to Ivan for assuming he was dancing when he was really mid-curtsy. Sometimes it’s so hard to tell.

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /nowlook at my bio, listen to audio I’ve posted, read presentations and speeches I’ve written, or get in touch (peter@rukavina.net is the quickest way). 

I have been writing here since May 1999: you can explore the 25+ years of blog posts in the archive.

You can subscribe to an RSS feed of posts, an RSS feed of comments, or a podcast RSS feed that just contains audio posts. You can also receive a daily digests of posts by email.

Search