OY! 8/

so i woke up yesterday and i immediately noticed that i was getting A WHOLE BUNCH of PHP “deprecated” notices on my web site.

i’m getting all these “deprecated” notices because my site has recently been moved to a server with a different IP address, because the server that i was on previously has been having MAJOR problems with the CBL, and the new server either ONLY serves PHP 5.3, or doesn’t have the notifications turned off, so that nobody sees the notices that the code may be deprecated. i’ve been fighting with my host provider (AGAIN 😐 ) for the past few weeks to fix the CBL problem, so, now that it has apparently been fixed, i don’t want to ask them to go in and make a trivial change to something i can’t change myself, when i can do something constructive (which will also make my web site more compatible, for longer) anyway, so i set about doing something myself.

i rallied around and found the solution to that particular problem, fixed it, and was feeling pretty good about myself, because i had “successfully diagnosed and resolved an issue that i don’t quite understand” when i got an email from a customer of my web site, telling me that he had experienced A WHOLE BUNCH of PHP “deprecated” notices on my site… so i wrote back and told him that i had fixed the ones that i could see, and if there were more, i didn’t know about them, so any help that he could offer would be greatly appreciated. in return he sent me a link to the osCommerce public contributions page which had a zip file with precise descriptions for how to upgrade my site from PHP 5.2 to PHP 5.3 all at once, without having to track down and eliminate the deprecated notices one at a time…

and it turned out that it was A LOT more complicated than it first appeared… and it turned out that it was a REALLY good think i had specific instructions, because there were a few little details about PHP that aren’t really that intuitive, and, while i thought i had the problem fixed, what i had done, ultimately, made things worse. 😐

ultimately, it meant making the following changes in about 100 different files, in multiple locations throughout the site:

OLD PHP5.2 NEW PHP5.3
ereg(‘whatever’) preg_match(‘/whatever/’)
eregi(‘whatever’) preg_match(‘/whatever/i’)
ereg_replace(‘whatever’) preg_replace(‘/whatever/’)
split(whatever) EITHER
explode(whatever)
OR
preg_split(‘/whatever/’)
DEPENDING ON OTHER CIRCUMSTANCES (which i still don’t understand)

the “whatever” parts were the ones that ecaped my attention originally… so, i got started fixing the problem for real, and then the power went out. 😮

this is september, there’s no snow… it hasn’t even rained for the past couple of months, and the power went out?!?

FRUSTRATING!!!!!!!!! 😡

so i sat in the dark for a while and cooled my jets, then i went for a walk…

and when i got home, THE POWER WAS STILL OFF so i rummaged around in the workshop with a flashlight and located a couple of battery-powered lanterns, which made things slightly better, at which point i sat in the “dim” until moe came home, at which point we went to bed, because there wasn’t anything else to do.

some time in the middle of the night – i’m not sure when, because all of our clocks are electric – the power came back on. i remember getting up and stumbling around the house turning off the lights which were still on, but nothing more than that.

when i woke up this morning (and the power was still on), i went back to my PHP coding, and i think i’ve got it all fixed — after “thinking” i had it all fixed once before, only to discover that a single period – . – that was left out of one file meant that the whole site was replaced with an incomprehensible PHP error…

so if you notice something wonky about the main Hybrid Elephant site, i would appreciate it if you would send me a note, saying what the error is (copy and paste from the web page) AND (especially important) the URI of the page that you were viewing… hopefully it won’t come to that, but if it does, that would be good… 😎

thanks.