PDA

View Full Version : Log IP On Error


damicatz
11-03-2001, 10:00 PM
Requested in : https://vborg.vbsupport.ru/showthread.php?s=&threadid=32106

EDIT : View my latest post for an update to this hack

This hack makes it so whenever there is a database error, the user who got the error's IP is logged and then included in the error e-mail that is sent to the administrator.

There is no demo currently.

Instructions are attached

JJR512
11-04-2001, 03:37 PM
OK, I've installed this. Now I just have to wait for an error so I can see what, exactly, the results of this hack are. I know what this does in theory, I just want to see some actual results. Does anyone know how to simulate a database error? ;)

eva2000
11-04-2001, 03:38 PM
Originally posted by JJR512
OK, I've installed this. Now I just have to wait for an error so I can see what, exactly, the results of this hack are. I know what this does in theory, I just want to see some actual results. Does anyone know how to simulate a database error? ;) shutdown mysql and let visitors hit an error ;) lol

JJR512
11-04-2001, 03:43 PM
LOL

I'm on a shared server, so I can't do that...but how about mis-naming the database name in the config.php file, would that do it?

damicatz
11-04-2001, 04:30 PM
Yes it would,

:p

That's how I tested it, I just stopped the service but you could also just misname in config.php

Lesane
11-04-2001, 06:25 PM
I gonna install it and let you soon know if it works, i receive more then 20 emails a day with the error: MySQL Server Gone Away so.... You will get soon a reply if it works :)

damicatz
11-04-2001, 06:38 PM
Hold on I just made a new version,

This one also sends the User ID of the user who got that error as well.

I know what you mean, maybe it's best to take out the please refresh part in the database error. Whenever there's a database error I get about 20,000 error e-mails because people love to just sit there and click refresh over and over for about an hour.

One thing of note about the new version, it can only return the UserId in some cases, if your database is completly down it probably won't be able to retrive the UserID.

*Goes to finish Announcement View Counter Hack :d*

Lesane
11-04-2001, 07:09 PM
1st version worked good and the 2nd aswell, thnx.

And yes, very annoying that ppl refresh the error. I taked out that refresh text.

Dark Blaze
11-30-2001, 06:07 PM
This is great. Now I'll be able to tell who keeps getting these errors :)

Could you have it to also show the username?

Well done with the hack :)

damicatz
11-30-2001, 10:13 PM
Originally posted by Dark Blaze
This is great. Now I'll be able to tell who keeps getting these errors :)

Could you have it to also show the username?

Well done with the hack :)

When there's a database error it's hard to get the username, because well there's a database error.

I can get the userid when the user table isn't broken but if it' something like the entire database is down it wouldn't work.

the_sisko
12-01-2001, 02:02 PM
Installed it and tested it...works fine, nice one!

Dark Blaze
12-01-2001, 06:45 PM
Originally posted by damicatz


When there's a database error it's hard to get the username, because well there's a database error.

I can get the userid when the user table isn't broken but if it' something like the entire database is down it wouldn't work.

True, didn't thought of that when I posted that question... thanks for your reply :)

LuBi
02-02-2002, 05:31 PM
Is this needed for 222? I have no members so I can't check it myself.. :mad: