ksummersill Posted November 2, 2009 Share Posted November 2, 2009 Ok first i will tell you the setup. I have one main directory that has many apps or websites in it. For examples: wwwroot -> apps -> and then a folder for each website. This keeps me from buying multiple servers. Anyways. I all are running php and i wanted to make a certain folder (Website) have its own log file assigned to it. Then if an error has occurred for those pages i can then email it to me. I want to record any error messages sent. Right now all i have is this on my index for that site: <?php ini_set('error_reporting', E_ALL); ini_set('display_errors', 1); ini_set('log_errors', 1); ini_set('error_log', 'phplogfile.log'); ?> But when i on purpose try to setup an error like print $sql and forget the ; at the end. The phplogfile.log is still empty. I just want to me be able to have the defaulted errors listed in it. Link to comment https://forums.phpfreaks.com/topic/180002-sending-default-php-error-messages-to-specified-log-file-email-logs/ Share on other sites More sharing options...
severndigital Posted November 2, 2009 Share Posted November 2, 2009 how about using the try {} catch {} method and throwing exceptions out to a log file?? that is how i do it. unless you are looking for something else I'm not getting from your post. Link to comment https://forums.phpfreaks.com/topic/180002-sending-default-php-error-messages-to-specified-log-file-email-logs/#findComment-949676 Share on other sites More sharing options...
ksummersill Posted November 2, 2009 Author Share Posted November 2, 2009 Well what i am trying to accomplish is the following: Record only the errors that occur on that certain page and time and send them to the email. Thats kinda summarizes it short and sweet. The problem i am having is the framework i have all my websites on. For instance in order to get to a specific page it has to be www.domain.com/index.php?action= and then the function. I want to be able to uses this send email if error function for all the pages in my index.php. I know very confusing. :'( Link to comment https://forums.phpfreaks.com/topic/180002-sending-default-php-error-messages-to-specified-log-file-email-logs/#findComment-949705 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.