Jump to content

error_reporter


onlyican

Recommended Posts

Hey

I am building an error_reporter thing for when queries go wrong

Now, as it is for queries, I guess tryna add to a MySQL DB is not a wise idea

So I was thinking of writing to a text document

BUT
if I write to a text document in the root of the website, and someone finds it, then they will see all the erorr details
The query, the mysql_error() message, the date, the page ect

Too much information to leave open

So I was thinking of adding it to the root of the web directory (Below public_html folder)

But when using fopen, fwrite, fclose, the dir needs to be 777

This means having a 777 in the Web Directory, which I dont think is a good idea now

Anyone have any better suggestions on doing this?
Link to comment
Share on other sites

chmod("/somedir/somefile", 0600); is read and write for file owner, nothing for anyone else (ref. manual)

You should however be pretty safe if you store your file in a folder and leaves an empty index.html file along with it. No one can find the file unless they know its secret name.
Link to comment
Share on other sites

ok

I have put the file in the website root (same as the index.php file for that website)
I tried using chmod 0600, but it failed to write
So I tried 222 (Everyone write, nobody read or execute)
and I can write, and if I go to that file, it is a 403 (Forbidden)

Which is wicked
Thanks
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.