Antique PHP

I maintain a website for a non-prophet organization on a free (as in free speech and in free beer) host. But it is a royal pain. Every page is hand crafted html (not by me, but the previous guy). I made some changes over time to make maintenance easier. Like:

  • Built an events manager system. People in the organization can log in and post events. The current events are linked out of a sidebar. The events people use this, and all is good. All the detailed info is writ to a dedicated events page by php.
  • Built a library database and manager so that would be one more thing I don’t have to hand edit (org has 150+ books and acquires more regularly). Librarian does not use this. Library list is easily a year out of date.
  • Built a navigation system so if pages are added or re-organized, I can edit a single php hash instead of every page. Nav menus are now php-generated. This required converting every page (over 60) to .php from .html, and hand editting vast amounts of variable handmade code just to #include the module and call the generator function.
  • Built an upload handler for newsletters. Our Newsletter Editor now logs in, uploads newsletter. The newsletter is parked where it needs to be and a link to it is auto-generated. Yay.
  • There were other mass changes but only to clean up code and restyle the site.

Sure, all this stuff does not represent a huge amount of work, but it does take time. When as a volunteer you can only commit a few scattered hours here and there, stuff happens at a glacial pace. We really need something better. A nice CMS.

Unfortunately, free as in beer = PHP version 5.1.6, released in 2006. No CMS works on this. No frameworks either. Not even CodeIgniter which is designed to be antique-friendly (to a point, and 5.1.6 isn’t it). I had pretty much given up finding anything of help. And with so little time, just doing simple hand edits is stressing since I know what is possible out there. Its looking very much like we have to pay for hosting. Such is life, but then there is the issue of all the setup and porting all the content. Depressing is a word to describe it.

Today, I was looking for a templating engine for PHP that is modelled on Django for a personal project. I wanted to use it for CodeIgniter. I do Django at work and love the template system. In searching for something related at work, I had found such an animal.  But that info is at work, so I did the Google search thing.

And found h2o-php which was not the one I remembered. Yet worth a look. And there under DependenciesPHP 5.1 +. By the noodle of the Flying Spaghetti Monster, I have found something usable on the free host.

A quick scan tells me I can cobble together code enough to make a quick and dirty framework, extend the database, add some CMS elements, and put off paying for hosting for a while longer. And the content porting will be trivial for the most part. I can design for soaking up content from the current site as-is.

A templating system is not a framework. But it is a critical part of one (unless you love punishment). Doing the rest of what I need is going to be a nice spare-time project.

Posted in Web development | Tagged | Leave a comment

Ubuntu 11.04, 11.10, 12.04

Today, I upgraded from Ubuntu 11.10 with the irritating Unity desktop to 12.04 with the significantly less irritating Unity desktop. If they keep going, it could become actually pleasant to use.

Sadly, at work I have a machine with 11.04 and cannot upgrade at all. Kinda locked in place until Ubuntu fixes things so you can skip non-LTS versions. Any day now.

I did find one problem while upgrading that I thought could be a showstopper for people not used to systems like Ubuntu. On clicking the magic upgrade button, it did some preliminary setup stuff, then downloaded all the files it needed. At one point it wants the MySQL root password. No problem. After that it was doing preparation of some sort (don’t remember the exact name). 20 minutes later, still sitting there like it is in lockup land.

I notice a button like   + Terminal   (not that color). This usually lets you watch what is changing in updates. Whatever, maybe I’ll find cause to reboot or abort. Click.

A terminal pane opens inside the updater. Its asking a question about restarting some services and is waiting for me to click [OK] or not. Aaaarrgghh!  Oh well, [Enter], things proceed. It would have been nice to show that sort of thing. Some small notice.

But that was the only problem. As I watched the endless scroll of activity, I realized just how hard the people who make the upgrade process alone have to work. Add to that all the developers doing kernal work and application work, and everything else.  Thanks guys. You did an awesome job.

12.04 starts faster, and Unity is much smoother to use. In 11.10 I could not find a way to shut down the computer from inside the desktop (you had to log out first). In 12.04 – got that fixed up. I’ve only just started so can’t say what else has changed. In 11.10 I  was thinking blow it all away and get Xubuntu or Mint with the XFCE dekstop which is quite pleasant as a developer’s desktop. But having seem real improvements in unity, I’ll stick with it and see where it goes.

The downside of Unity is that is seems to be optimized for people doing just one thing at a time. As a software developer, I might have a half dozen tools up (multiple terminals, ide, browser, maybe even the gimp) and its a bit of a pain to always have to mouse way to the top of the screen to do things like click Tools->Web developer or File->Open. An improvement is being able to right click on a terminal window and at least get the File menu.

So I am hopeful Unity will work out. If it gets too irritating I can just set up 12.04 Xubuntu or Mint 13 in a vm and use that without having to start over. Its all good.

Posted in Linux, Web development | 2 Comments

9/11 – Yet another post.

I won’t get into the 9/11 thing. We all, who were alive and aware at the time, have our memories. Most of us, including me, remember exactly what we were doing when the news arrived. We know, could not help but learn, who the perpetrators were, and their motives.

And that is something that must be remembered. Murderers all, driven by Islamist extremism, pumped by psychotic hate-fuelled leaders. All guilty. On some level the highjackers were the least guilty, they whose minds were highjacked by the garbage that pumped them up and trained them yet as would not themselves dare do anything. But guilty nonetheless. The facts speak for themselves.

Today, someone on tv made reference to one Nycole Turmel, interim leader of Canada’s New Democratic Party. That reference was to this sentence by Nycole Turmel:

That kind of faith in each other was shaken on September 11, 2001 — pierced by those four rogue aircraft that caused such suffering.

Emphasis mine. Full text: Maclean’s and others.

So those “rogue aircraft” just flew themselves?  Or is this woman yet another nut case, the kind that plague us with statements hauled out of … only the t.p. knows where?

We who, whether distant or right there, know the accurate term is “Islamic extremists” or “terrorists”, or something similiar. No rogue aircraft had any part in the attack on the towers. Not any. None.

Maybe Nutty Nycole should join a 9/11 truther organization and flog her theory on the rise of the machines. Terminator aircraft from the future or something.

Posted in Uncategorized | Leave a comment

Losing your identity

I long ago decided I would never be on Mark Zuckerberg’s private internet. With the privacy horror stories coming out of that place sometimes multiple times per week – thanks but no thanks. It seems so AOL anyway.

I had watched as Google put together one, then another, social networking site. This time Google 1 (or +1, or something). I had thought that maybe this would be the way to go. And after not bothering for months, and having read a few horror stories, tonight I clicked one of those [+1] buttons that show up on google searches and some websites. I had done this before, thinking no more of it than hitting a [+]/[Like] on any other site for comments or videos.

This time a window pops up that is basically an invite to sign up for Google +1. Hey, maybe. Read privacy policy. One of the terms, in part, is:

In order to use the Google +1 button, you need to have a public Google Profile visible to the world, which at a minimum includes the name you chose for the profile. That name will be used across Google services and in some cases it may replace another name you’ve used when sharing content under your Google Account. We may display your Google Profile identity to people who have your email address or other identifying information.

This is known as a deal breaker.  I have more than one identity, and wish to keep them separate. I also like my one-word names, and that goes away. To be realistic, it would be easy to identify and x-ref all my names/handles. But that does not mean I should throw them aside on Google’s whims.  So I choose not to +1-isize me.

I am not alone. See and Identity Woman’s insightful takes. Identity Woman has a long running experience with it that is worth following.

One day, some enterprising person or company is going to create a social networking site with as many goodies as Facebook or Google’s efforts without the identity-ripping attitude. That I will sign up for.

Its not a matter of distrusting Google. They are clear and honest in their Terms. Its just not the product for me.

Posted in Internet, Privacy | Leave a comment

Spying on customers via webcam legal in US

Just when you thought Facebook was bad for sucking up all your details. This is enough to make Zuckerberg envious. Spying on customers via webcams and keyloggers is now legal in the US.

According to the story, you rent a computer from Aarons (they do rent-to-buy), Aarons installs a server that Aarons employees can use to monitor you via webcam.  Customers are not told of this.  But thats ok. Since a court has ruled its perfectly fine, they can continue grabbing snaps of customers, and do other browsing of the unit (a keylogger is featured too, so bank account passwords, etc, Aarons gets it all).

Aarons – where your always a lucky dog because we know when you’ve been playing with your junk. I wonder if they’ll start a social network. Hmmm….   Aaronsbook – posting public vids of you snarfing a booger on your wall.

Posted in Uncategorized | Leave a comment

Wireless, the get rich quick scheme

Saw an article on Telus (Canada) reducing wireless prices. They all need to drop a lot further – every company in the Canadian market is a gouger.
Telus’ roaming rates into the US are $3,000 per gig, pretty much the same as everyone else. Outside of Canada and the US: $10/meg:  That is $10,000.00 per gig. Based on some numbers on the Telus website, could be as high as $25,000 per gig.  I really need to start a wireless phone co and become fabulously wealthy with only a few thousand customers who like to travel.

Canada, the land of high prices:  Canada’s data-roaming charges highest in OECD

If I was to travel internationally, I think I would leave the phone at home and get a pay-as-you job in where ever I am.  Or make sure the phone is WiFi-equipped and disable the gsm/cdma stuff for anything except voice calls (even then, a Skype app is an even cheaper deal). Of course, a lot of people are in no position to do that.

If the telus link is unreachable its because they are filtering ip addresses (there’s an impolite name for that). If you get into the site at all, you want something that looks like this:  — The red text is the zone. Yours is going to be different. You might get through via a TOR connection or a proxy server in Canada.

Posted in Internet, Scams and Schemes | Leave a comment

Net Neutrality in Netherlands

I came across a story in that goes into some detail on a net neutrality law in the Netherlands. ISPs, especially the wireless variety, complained bitterly about how they could no longer rob would be hurting for texting/SMS cash.

No doubt. Dropping the words premium text scams into Google gets you a million+ results. Those things are pure gold to the wireless ops, gold on top of the usual outrageous charges.  People love being able to text through other apps, and that is already cutting into their take.

A big benefit: you can have the operator switch off SMS and never risk a hit from a premium text again.

If only that kind of law makes it to Canada. We will be able to call ourselves civilized again. Sure, they’ll still charge $3000 per gig for roaming out of country, but texting is super low bandwidth.

Posted in Internet, Scams and Schemes | Leave a comment