daydreamer Posted November 25, 2008 Share Posted November 25, 2008 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 More sharing options...
revraz Posted November 25, 2008 Share Posted November 25, 2008 htaccess? Also, your host doesnt provide you with a folder that is on the same level as your web folder? I'd switch hosts. Link to comment https://forums.phpfreaks.com/topic/134250-preventing-access-to-errorlogtxt/#findComment-698859 Share on other sites More sharing options...
daydreamer Posted November 25, 2008 Author Share Posted November 25, 2008 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 https://forums.phpfreaks.com/topic/134250-preventing-access-to-errorlogtxt/#findComment-698864 Share on other sites More sharing options...
flyhoney Posted November 25, 2008 Share Posted November 25, 2008 Can you place the error log in a directory a CHMOD it so that the public can not access it? Link to comment https://forums.phpfreaks.com/topic/134250-preventing-access-to-errorlogtxt/#findComment-698868 Share on other sites More sharing options...
daydreamer Posted November 25, 2008 Author Share Posted November 25, 2008 I cannot change the permissions on any of the folders because it is a windows server and I only have FTP access. Can you place the error log in a directory a CHMOD it so that the public can not access it?Is that what you mean? Link to comment https://forums.phpfreaks.com/topic/134250-preventing-access-to-errorlogtxt/#findComment-698877 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.