Page 1 of 1
D'oh!!
Posted: Fri Jul 29, 2005 1:37 am
by s.dot
Being on PHP DN, I assume we are all PHP programmers or at least a programmer of some nature. Starting out in PHP I had problems like any n00b would.
- I didn't know $_GET from $_POST from a hole in the ground.
I'd always separate my arrays ($SQL = "", $QUERY =, $ARRAY =), not wrong, but definately a lot more typing.
I'd check my page to make sure it went right even after little commands like echo "hi";
But I'm interested in your big screwups

.
I'll go first:
My biggest screw up came about a month and a half ago. I wrote a script that would pick out users whos accounts had no pictures, and then delete them and their directory from the server and database. But, something went awry in the script and I deleted EVERY PICTURE on the server. Almost 2 GB of pics! D'oh! Lesson learned: keep backups.
What's your biggest mess up?
Posted: Fri Jul 29, 2005 5:43 am
by timvw
6 years ago, i was the admin of a server, and was kicked off the system when i was installing ipchains and the default deny all rule

Luckily it was a server of me and some friends, no boss to complain

)
Posted: Fri Jul 29, 2005 7:26 am
by Chris Corbyn
I've never had a big screwup... I'm too good
Nah but seriously, I can't think of anything right now but I'm sure something will come to me shortly. I certainly havent caused damage using PHP by mkistake (I have however had cockups mistypin a linux command - BIG STYLE).
Posted: Fri Jul 29, 2005 9:18 am
by Deemo
i have never really written a program that would cause a computer to blow up, but the worst i ever did was overwriting 200 rows in a database by uploading the old version
lots of typing after that happened

Posted: Fri Jul 29, 2005 9:58 am
by John Cartwright
Deemo wrote:i have never really written a program that would cause a computer to blow up, but the worst i ever did was overwriting 200 rows in a database by uploading the old version
lots of typing after that happened

I've done that before, but with many years worth of data - luckily I have a cool host that performs backups regularly.
Posted: Fri Jul 29, 2005 10:03 am
by nielsene
My biggest problem is similar to those, mistaken deletes in the DB. Never via PHP alwasy by command-line direction connection to the DB. DELETE FROM foo; instead of DELETE FROM bar;.... Luckily it was on a test server and only took about an hour to reload that data..... Still I've made a habit of turning off auto-commit now and not doing manual db manipulation late at night....
Posted: Fri Jul 29, 2005 10:05 am
by timvw
That is even more fun with cascading delete/updates

)
Ah well, these are all good examples why backups are required

Meaby another topic: What is your backup strategy?
incremental bacup daily, full backup weekly?
Posted: Fri Jul 29, 2005 10:08 am
by nielsene
timvw wrote:That is even more fun with cascading delete/updates

)
Ah well, these are all good examples why backups are required

Meaby another topic: What is your backup strategy?
incremental bacup daily, full backup weekly?
PITR

Posted: Fri Jul 29, 2005 10:11 am
by redmonkey
I've never had any major howlers with PHP. However a few years back I wrote a little Perl util to go through some 6000+ files grepping out some of the data. Unfortunately, I had piped the data in the wrong direction and ended up with 6000+ empty files.
Posted: Fri Jul 29, 2005 10:32 am
by Todd_Z
The first major screwup: When I started progging I made a palm handheld version of 'the sims' called 'the bums' I spent a good 6 months on it. Never backed up. Not once. Needless to say, i lost it all. Lesson learned!
Second majour screwup: I used fopen("blah", 'w') instead of fopen("blah", 'r') on my entire reviews folder on
http://www.acdrifter.com. Luckily my friend who does the content was online so he was able to upload the reviews in a few seconds. But still, I was quite worried.
Posted: Fri Jul 29, 2005 10:35 am
by nielsene
Todd_Z wrote:The first major screwup: When I started progging I made a palm handheld version of 'the sims' called 'the bums' I spent a good 6 months on it. Never backed up. Not once. Needless to say, i lost it all. Lesson learned!
Second majour screwup: I used fopen("blah", 'w') instead of fopen("blah", '<span style='color:blue' title='ignorance is bliss'>are</span>') on my entire reviews folder on
http://www.acdrifter.com. Luckily my friend who does the content was online so he was able to upload the reviews in a few seconds. But still, I was quite worried.
the aolbonics filter strikes again... Of course, given your avatar, I almost expected to be "arrrrrghh" instead

Posted: Fri Jul 29, 2005 10:46 am
by pickle
My very first week on my current job, I was working on a database. I had to delete an entry so I thought I'd have some fun and re-write it to say "Whoops, I did a bad bad thing".
In hindsight that wasn't too smart because I forgot a little thing called a "where" clause in my query. So, for about 3 hours until we got the backups, every entry in this particular database said "Whoops, I did a bad bad thing".
Fortunately it was summer so people were just light-hearted about it.
Posted: Fri Jul 29, 2005 10:51 am
by josh
My biggest screw up is the same as pickle's except with a delete, yep 70,000 rows gone because of no where clause, luckily had a backup from the previous day already on the server and all I had to do was open up putty.
Posted: Fri Jul 29, 2005 6:36 pm
by timvw
redmonkey wrote:Unfortunately, I had piped the data in the wrong direction and ended up with 6000+ empty files.
Long live "find /path -empty"
