Annoying Poll

Where we keep all the boring tidbits about the PHPDN site, the news, and what not.

Moderator: General Moderators

Most annoying type/bug/error in PHP.

Missing ;
22
15%
if ( $supersecretpw = $test_password )
17
12%
((())())(()))(())((())
16
11%
}...hrm, now which one does this go to?
25
17%
Headers already sent, damnit!
36
25%
Notice: Undefined variable...grrr
7
5%
Function does not exist...*boom!*
5
3%
Internal Server Error 500...Noooooo!!!!
7
5%
.asp/.cfm/.jsp/.pl
0
No votes
Cannot access phpdn database. Database is unreachable...
10
7%
 
Total votes: 145

User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

hawleyjr wrote:This isn't really a bug just fatigue. Occasionally I will make a change to code move the file to the server, test it, change the code again because it didn't work, move it to the server, test it..... And so on until I realize I was moving the wrong file to the server.

been there done that...

I've probably done that quite a few times. Now I just had apache+php installed in my comp :)
Schonhose
Forum Newbie
Posts: 1
Joined: Thu May 27, 2004 3:59 am

Post by Schonhose »

Reading these comments makes me laugh.

And then I realize that I made them all :oops:
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

Not a coding thing, but the stupidest computer-related thing I've done...

About four years ago I was promoting one of my companies websites at the B'ham NEC. They'd set up loads of chairs and tables, and loads of computers were available, but not many people were coming round.
Anyway, I found a computer near the back and started posting on some forums, then downloaded IRC and started chatting.
Bloke on IRC wanted a game file downloaded but he couldn't get it from work, so I said I'd get it for him, and went onto warez.com and started the download, moving the pr0n pop-ups out of the way as I went.
Anyway, while the file was downloading, I noticed that one of the popups had been made so it was upside down and mirrored.
Intrigued, I started to decipher the text (the pictures looked the same, you just can't tell which way they should be up with pr0n).
When I'd finished reading, I looked up to see it there was a fire exit or somewhere I could go to have a smoke.

That's.

When.

I.

Spotted.

The.

Hooooooooooooooooooooooge.

Plasma.

Screen.

At.

The.

Front.

Of.

Room.

That.

Was.

Hooked.

Up.

To.

My.

PC.
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

OMG!! LMFAO!!!

I believe Grim wins!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Yeah, that's a winning "oops" or rather "holy shi*t!"
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

I also can relate to Weirdan's issue...

Me and a coworker was sitting alone after workhours, messing coding some tools that could help us in the future.
My coworker pops the question; "Btw, are you sure we are working on the dev-server?!".

I just had to reply "Oh NO!" just to see his reaction but gave myself away because I started laughing about 10sec's later when i saw him panic. Oh so fun. Joy, joy...

While laughing, I slowly started to review the code, just to note that we were indeed working on the master server! My pal of course didn't belive me this time as I made a fool out of him 1min before this.

So we had managed to replace all article descriptions (22.500 or so) with the words "End If", truncated the balance in store field to 0, removed all articles starting with '11%' among other horrible, horrible things.

Of course, there was a backup. But I had to make an embarrasing call to an superuser that could save us (that also was utterly unfriendly in his tone), and I can not explain the feeling when realizing we (ehm, read: I) made such an error.
I do however remeber screaming about 40 sentences where 90% where words not suitable for children and that I at one point where kneeling at the desk...
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

Must be when you have got too few or too many { }, it can take alot of time too find them :?
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

feyd wrote:Yeah, that's a winning "oops" or rather "holy shi*t!"
:oops:
User avatar
Heavy
Forum Contributor
Posts: 478
Joined: Sun Sep 22, 2002 7:36 am
Location: Viksjöfors, Hälsingland, Sweden
Contact:

Post by Heavy »

malcolmboston wrote:
jason wrote:Or stupidest moment?
The day i came onto devnetwork asking for why my insert script was'nt working it was something like
[...]
affected rows was telling me it had inserted it had me stumped for hours, bech then told me i had'nt actually queried tha database, absolute proof, you should'nt spend 16+ hours solid coding.
Well... I think that whole post is a typo...

The most effective typo I ever did was one character long...
Not really a true typo. It was more like I didn't know any better but it surely had me feel stupid.
Here it was in the company's main server /etc/exim/exim.conf file:

Code: Select all

relay_domains = *
It took several weeks before mail servers began accepting email from us again...
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Post by infolock »

missing }'s.. well, that used to be true until i got Homesite :D
Darfuria
Forum Newbie
Posts: 6
Joined: Mon Jun 14, 2004 4:14 am
Location: UK

Post by Darfuria »

kik has to be the most annoying typo of 'lol' if you are in a chat room or something. Also any random ones that you get when you are typing, and that of smileys... Typos on the whole just generally ammuse me and I like taking the <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> out of those that try and master typing and dont make any typos :p Typos show a true computerholic :p
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

Ha! Guess what I did! Not realising that MYSQL's TIMESTAMP updates not only on insert but also on UPDATE, I ran a batch update and lost a column of dates. I guess I learned the hard way why you don't use timestamps for dates you want to keep. My last database backup was two month ago too. Not sure what I'll do now. There's no way to get that data back, is there?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

it's possible to restore your timestamps if your server have log-bin turned on and you haven't flushed your binlogs since the time of last backup
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

you mean the mysql server?
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

It is possible to use TIMESTAMP to store dates although possibly more error-prone compared to DATETIME (which also has a much larger range). You may have figured this out already but, from the manual:
The TIMESTAMP column type provides a type that you can use to automatically mark INSERT or UPDATE operations with the current date and time. If you have multiple TIMESTAMP columns, only the first one is updated automatically.

Automatic updating of the first TIMESTAMP column occurs under any of the following conditions:

The column is not specified explicitly in an INSERT or LOAD DATA INFILE statement.
The column is not specified explicitly in an UPDATE statement and some other column changes value. (Note that an UPDATE that sets a column to the value it already has will not cause the TIMESTAMP column to be updated, because if you set a column to its current value, MySQL ignores the update for efficiency.)
You explicitly set the TIMESTAMP column to NULL.
TIMESTAMP columns other than the first may also be set to the current date and time. Just set the column to NULL or to NOW().

You can set any TIMESTAMP column to a value different from the current date and time by setting it explicitly to the desired value. This is true even for the first TIMESTAMP column. You can use this property if, for example, you want a TIMESTAMP to be set to the current date and time when you create a row, but not to be changed whenever the row is updated later:

Let MySQL set the column when the row is created. This will initialise it to the current date and time.
When you perform subsequent updates to other columns in the row, set the TIMESTAMP column explicitly to its current value.
On the other hand, you may find it just as easy to use a DATETIME column that you initialise to NOW() when the row is created and leave alone for subsequent updates.
Post Reply