here's the basic story.
About 10 years ago i wrote a comprehensive suite of web pages and database code to track and bill customers that send samples to the facility where i work for chemical analysis.
Apart from the occasional person managing to put something completely unexpected into a form and breaking the SQL query, it has operated flawlessly for all that time.
A month ago, out IT guys decided to migrate all the internal web utilities onto a new server. OK Fine. Problem is the old server used PHP 5.3 and the new one uses PHP 7.0 so pretty much all the database handling code was incompatible with it so I started working my way through all the stuff bit by bit to bring it up to speed before the new server goes live.
All perfectly normal. A complete pain in the ass but normal.
So here is where it gets weird.
Today when I was checking through the last few pages and testing the hell out of it I found that a particular PHP file was failing to load the list of projects that I was calling for via a dynamically created link from another page.
Basically the old code (unchanged for 10 years) is sending a url with attached data that the target page grabs from the URL via $_GET statements (for those unfamiliar with how web pages send data)
So my link is sending the values p (for project), s (for set) and m (for mode. The receiving page does multiple different things depending on the mode)
What should happen is that the receiving page displays a printable record with all the data related to the project and set number that i send into it. (The clerical staff related to billing and whatever have been using this system for 10 years without any errors so it must have been working fine.)
However when I tested it today it just spits out a message "Record not found" for any url in the list.
On closer examination i found that the query in the receiving page also requires one extra piece of data. "record" (which is a unique identifier given to every record in the database)
It reads this value in using a $_GET command from the urls so it was expecting this to come in from the URLs in my list.
The thing is that the page generating this list didn't actually have access to that piece of data in it's present form so it wasn't sending it.
I had to completely rewrite a couple of DB queries to make the record number available to send in the URL.
So the question is HOW THE FUCK has this software been working for the last 10 freakin year when it has clearly never been sending the correct information needed to run the query that displays the record?
Seriously WTF is going on?
I hate stuff like this
![Confused :?](./images/smilies/icon_e_confused.gif)
But it always seems to happen to me
This one that happened a couple of years back is even weirder:
First i bought a used recirculating chiller (basically it pumps refrigerated water around a closed loop of pipes to keep a pice of equipment cool)
It worked fine for about 5 years then one morning I found that it wouldn't turn on.
I called in the facility electrician and we went to look at it together. he couldn't figure it out either. the fuse was Ok and the power supply was fine but no power was reaching the circuit board that controls all the relays.
After extensive testing we isolated one section of 3 core cable that ran from the main transformer up to the electronics. This was a 220V system with one ground and two live wires each with 110V in opposite phases.
So we removed this offending cable to examine it more carefully and what we found was the most bizarre thing that either of us had ever seen.
The red wire (+110V) was completely missing down it's entire length(2 feet or so). The black (-110V) and the green (ground) wires were there but where the red wire should have been there was absolutely nothing just a long empty tube running down the whole length of the cable. Both ends were there, still attached to their terminals but they only went about an inch up the cable and then nothing.
As it took us about a half hour to get this cable out I really find it hard to believe that somebody was pranking us. Additionally this was a critical piece of equipment for operating a subsidiary part of a nuclear reactor so anybody caught deliberately doing this would have been subject to some extreme disciplinary actions possibly including jail time.
Also there was no sign of tampering. The layers of dust that had built up over the years were still undisturbed all around this rather grody looking cable
So again HOW THE FUCK had this thing been running 27/7 day in day out for 5 years when it was missing it's main power cable.
Did it just volatilize or spontaneously combust? without leaving any burn marks?
Did the entire red cable just suddenly quantum tunnel itself to the fourth planet of Rigel?
I guess weird unexplainable shit just happens now and then
![Shocked :shock:](./images/smilies/icon_eek.gif)
Anybody else ever experienced anything like this?