Jump to content

Preventing access to errorlog.txt


daydreamer

Recommended Posts

I am using this code to prevent output of error code:

 

error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors', 0); // Hide all error messages from  the public
ini_set('log_errors', 1);
ini_set('error_log', "errorlog.txt"); 

 

but I am on shared hosting, and my entire folder and sub folders are all accessible to the public, i do not have read/write access to any other folder on the server.

 

How do I prevent people reading this error log?

 

At the moment I am just giving it a random name instead of errorlog.txt, and directory listing is disabled.

Link to comment
Share on other sites

they dont allow me to do .htaccess on the server I am using.

 

I have access to two servers on my one hosting account.

 

One is linux without SSL (but with .htaccess), and the other is windows with SSL functions.

 

My website uses SSL so the linux server is basically unused.

 

I think my only option is to write my own error function and save details into mysql.

 

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.