Unidentified PHP Bug

Monday, February 26. 2007

Bug is known to be small, hides in corners and although is present everywhere, only makes itself known in odd circumstances. It flitters about in the air just above you where you don't expect it during those circumstances. At other times, it snuggles up in a corner, but is always present, waiting for the right opportunity. Considered to be armed and dangerous, as well as mischievous.

For the past year or so, I've been either trying to figure out what's wrong with a script I wrote, or whether or not I should rewrite it from scratch, or if possible, how to save the thing with odd workarounds. I thought, "there's got to be something wrong with my code". Every day after looking at it for hour after hour, not able to figure out what the cause of the problem was, I would think, "There's got to be some sort of bug in PHP!!!"...but when I'd think that, I'd try to do a search to find any other people who've had similar circumstances.

Well, poor coding practice (non-cached dynamic image) alongside some tricky $_SESSION management (and requirements) caused for some odd behavior. Session data was getting dropped on certain pages for no good reason. It worked fine up until a certain page and/or point. I'm not entirely sure what the error is caused by, but I do know that removing the dynamically created image stops the error and the session information continues to behave as would and should be expected. If anyone's interested in tackling the identification of this bug, I'd absolutely love some help, expert or otherwise. Unfortunately, as of right now, I'd have to share full code disclosure as I can't identify any smaller problem code than the full application with those certain settings turned on or off (as I just found the error); so I've really no idea what combination of code is required to recreate this error. I also do not have any debugging software strong enough to show what the stack trace/dump would look like during execution of the problem page.

...but man... 1+ year of being annoyed by this thing. For a long time, I thought it was the server configuration. I was damned sure of it. My test-bed development machine never rendered the dynamic image. ;)

Gates vs Jobs

Tuesday, February 20. 2007

The viral movie craze is catching on... This one's hilarious! You'll have to see it for yourself.

Country Based TLD

Tuesday, February 20. 2007

So, long before our library had a nice and short website URL, we used a rather long one that isn't as easy to remember as one might think:
saratoga.lib.ny.us

Now, we've primarily been using the newer, shorter URL, and have almost all but forgotten about this longer, harder to remember one. Now that we need to move from a purely in-house hosted server to (something else), I need to change the nameservers for each of our domains. The older, longer domain name has lost all related information, possibly during the internal changes at the original .US TLD registrar service. So then, in order to get this back, because it was originally used for US governmental domains, I need to go through a whole slew of forms and bureaucracy with vocabulary that I don't entirely understand, and most of my friends will tell you that I'm quite fluent, at least more so than they are (for the most part).

So, can anyone give me any good reason as to why we should even bother trying to keep this? It's not advertised on any of our marketing material anymore, there are practically no incoming hyperlinks to that domain, and it'll just be a pain in the butt. However, if there's just one good reason as to why we should persist this "thing", I'd gladly go through the trouble of getting access to it back (i.e.: jumping through hoops).

Some interesting finds...

Friday, February 16. 2007

It's not that I've been enormously busy lately, I just haven't had much to talk about that I felt would be interesting. Today, I ran in to two neat things, and remembered another one.

1 - Ever wanted to allow collaboration within your department (teleconferences on-the-road, telecommute, etc...)? From a quick view of this project, it appears that (with difficulty, mind you), you can...for free* (cost of hardware and labor not included!)! Check out 1videoConference for more information. They have a project page on SourceForge.net (also linked to from their homepage).

2 - While recently trying to figure out if there's an easy way to implement syntax highlighting in an HTML textarea box that is cross-browser compatible, I found ECCO, a web-based text/programming editor. There are plugins to Firefox that do similar things, but this one looks more promising. I honestly don't see a whole lot of merit to this, but it's definitely a really cool proof of concept with some amazing coding (and/or JS hacking).

3 - phpMyBackupPro has recently released a new version after a very long hiatus. I was looking for a quick means to run backups on our MySQL server(s) and didn't want to have to use a GUI to do so...why would I want the troublesome bother of a win32.dll kernel panic error when a database backup was going to run, and getting data is rather simplistic anyway from the command line (and I was too lazy to write my own batch scripts). I found this... It's actually really handy. It allows you to dynamically select which databases/fields you want to backup from any number of different servers...it'll also do error checking to be sure that you're configuration files are properly set. I run a batch script to call the CLI version of this PHP script each Friday night after the library is closed (at slow usage times), and then another batch script to transfer those GZ compressed backups from off my machine to yet another server that gets backed up every few days (you could always let the script delete backups older than X days, and simply copy the backups to an external server, that way there are 3 unique points of failure instead of 2).

There you have it, some possibly useful, somewhat interesting things to report on. Have a great week!

Server Monitoring

Saturday, February 10. 2007

While wandering around the web, I somehow accidentally came across a free service that allows people to monitor their servers for free. Free has always been a nice "selling" point for me... Anyhow, this service allows me to send HTTP, HTTPS, FTP, SIP, TCP, UDP, IMAP, SMTP, POP3, PING, and DNS all for a specified IP or domain (and/or subdomain). I can create reports, allow more than one person to view the resulting information (I think), do some benchmarking, subscribe to feeds on my data...and it can contact me in various ways in the event of any failures:

Contact Options:
  1. SMS (cellphone)
  2. Email
  3. ICQ
  4. Yahoo
  5. MSN
  6. Google Chat
...sorry, no AIM (yet)...

Continue reading "Server Monitoring"

(Page 1 of 2, totaling 9 entries) » next page