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
https://forums.phpfreaks.com/topic/134250-preventing-access-to-errorlogtxt/
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.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.