Thursday, March 23, 2006

PHP5 Coming Soon to A Server Near You

I don't know how many people use php on their sites and how many have had their servers migrate to php5. I'd guess not too many, since php5 appears to be a major enough change that risks seeing many php applications break. But the move to php5 is coming soon everywhere I've been told. It's been out for about a year, so it's high time to bite the bullet.

I am facing such a migration by June - yikes! I am quite worried that suddenly my sites and those of my clients won't work any more or will work but be buggy every so often. So I have started collecting tidbits of information on what is changing and how it can be handled with minimal effort.

A few things that are changing are various defaults normally defined at the server level in the php configuration file php.ini:
1. register_globals=Off by default rather than On - This affects the availability of server environment variables, form field variables (POST and GET) and query string variables. With register_globals being off you have to first get their values by either $_GET[varname] or $_REQUEST[varname] or similar constructs.

2. short_open_tag = Off by default rather than On - Maybe the nastiest of all, as lots of php scripts rely on the short open tag .

Other more subtle changes affect how functions such as include_once and request_once are treated. For those who used them as they had been intended, not taking advantage of inhernet ambiguities that exist in earlier php versions thus allowing "creative" manipulation, they should continue working. Otherwise a shift in philosphy is needed it seems.

And other even more subtle changes are in the realm of what I call php geekdom. Stuff I've never myself used and have no clue what they are and how to use them and when and why. Probably what will do me in, in case I ever felt I was good enough in php progamming.

While it is probably safe to expect that those who wrote their own scripts can (albeit painstakingly and cursing all the way) fix their own stuff, it is less obvious what the effect will be on packaged scripts such as forums, guestbooks and other applications, especillay anything using MySql databases (which also face some changes). Hopefully their makers will provide timely upgrades to php5 compatible versions AND these upgrades will not be buggy - yeah, right!

Anyway, here are discussions on how to migrate to php5:
www.experts-exchange.com/Web/Web_Languages/PHP/Q_21493642.html .

More information yet:
www.php.net/manual/en/faq.migration5.php
http://us2.php.net/manual/en/migration5.incompatible.php

Good luck to all who have to face this in the near future. I know I'm going to need it, especially since I'm a very novice php programmer still .

Monday, March 13, 2006

It's About Time!

Finally, the wave of brats who use MySpace has subsided in my fav hangout, the Statcounter forum. As a mod there I have had to spoon feed countless urchins who can't follow instructions if they involve more than one 3-word step.

All of them wanted to satisfy their craving for voyeurism and exhibitionism all the same time. After having concocted some god-awful page and blog and whatnot on MySpace, with all manner of inane information, then they spend the rest of the time wanting to peep in and see who else from MySpace or elsewhere would be checking out their page. This alternating with wanting to block this one or that one as well.

Somehow they got wind that they could use Statcounter tracking code, despite MySpace's policy against using scripting of that nature. It wasn't long before somebody with a lot more knowledge about web stuff than your average MySpace user (who mostly all seem to be pre-teens or teens) discovered a way around that. So all these kids started flocking to Statcounter looking for the miracle method.

I must have explained a hundred times the same thing over and over again. I rushed a few whose attention span was shorter than my cat's. Dammit, they should be doing their schoolwork instead of that garbage pastime.

A few days ago I sort of gave in and actually wrote a script to do all the work they somehow aren't able to do since they are so incapable of following simple instructions.

Feeling very proud and satisfied to have finally solved the MySpace problem once and for all so I can have some peace, LOL, MySpace finally plugged the loophole that allowed that method. It must have happened the same day. The irony of it! I had been praying for a long time that it would happen and when it did I didn't even know it in time to save myself all the trouble LOL!

And now I still have a few who come to ask about other possible ways to achieve the same thing. My goodness, don't they get it? MySpace doesn't allow it, which part of that don't they get?

Anyway, I actually feel vindicated. This has been a real PITA for so long, and I've been biting my tongue so many times not to explode at all the brainless requests. About time, I say.

Kudos to MySpace for finally plugging that damn loophole. If only they could clean up the site as well it would go a long way towards it becoming a respectable community. As it is, I pity the few right minded, intelligent adults who use it for the actual intended purpose. They are in deplorable company, sorry to say. Better get out while you can is my advice to them.

I know kids need their playgrounds. But as kids they also need supervision and guidance to stimulate their brains with useful activities. So far MySpace doesn't provide that. Instead of a healthy playground it is more of a dank back alley for all sorts of shady activities.

Bah, enough of this drivel.

Friday, March 10, 2006

Real Life Rant

I've been back at work for exactly 9 weeks now. As they say, plus ça change, plus c'est pareil...

Few adventures in getting settled back into my digs, with network connections not quite working... the usual stuff. Changed window side. Facing the west now, so I get all the afternoon sun ... hmmmm... that helps lift the spirits a bit.

It's tough, I'd lost the habit of the 9-5 pace. Haven't quite found it yet either, LOL! I feel pretty jet-lagged most of the time, as I try to cram both the job and my web hobbies into the same 24 hours which are simply not enough. Oh, well... shouldn't complain, at least I still got a job.

Actually the part I hate the most about this deal is the commuting. Unfortunately my employer isn't open to the notion of telecommuting. I find I get anxiety attacks regularly while driving. Either because of some idiot who is riding my bumper, angry that I'm still ahead of him though already 20Km over the speed limit due to all the pushing, or due to our notoriously bad roads full of huge potholes combined with the high winds of late that seem to want to push my car off the road. They all contribute to me feeling queasy every so often, like when you ride a rollercosater. When that happens it's quite scary, I need to get off the road and calm down. Not good, not good at all. I wish I could just take the train but it's not working out schedule-wise.

I find I look forward to the end of the day and end of the week a lot more than I used to.