canadabeeau Posted March 15, 2010 Share Posted March 15, 2010 Hi all, bit of an interesting question in regards to all the PHP error codes knwo so weel to us :-D Is there anyway to set PHP to send all error codes to a DB to be stored? or a string that then can be sent to a DB, by error codes I mean all the PHP error codes eg Fata Error has occured on line # of file ### If anyone as any form of a suggestion or know how, please let me know, it would be much appreciated Quote Link to comment https://forums.phpfreaks.com/topic/195298-error-codes/ Share on other sites More sharing options...
aeroswat Posted March 15, 2010 Share Posted March 15, 2010 PHP has it's own error log if this will solve your problem. Check out this information http://www.cyberciti.biz/tips/php-howto-turn-on-error-log-file.html Otherwise you will have to create error handlers for each error where you specify what the error is and save it to the database like you would anything else. Quote Link to comment https://forums.phpfreaks.com/topic/195298-error-codes/#findComment-1026305 Share on other sites More sharing options...
canadabeeau Posted March 15, 2010 Author Share Posted March 15, 2010 Okay so how would I go about the making my own handlers for each error as you said? I need the ability to simply automatically send the error codes to a string/DB Quote Link to comment https://forums.phpfreaks.com/topic/195298-error-codes/#findComment-1026381 Share on other sites More sharing options...
KevinM1 Posted March 15, 2010 Share Posted March 15, 2010 Okay so how would I go about the making my own handlers for each error as you said? I need the ability to simply automatically send the error codes to a string/DB set_error_handler Quote Link to comment https://forums.phpfreaks.com/topic/195298-error-codes/#findComment-1026388 Share on other sites More sharing options...
canadabeeau Posted March 15, 2010 Author Share Posted March 15, 2010 And this error handler would have the caability of detecting file and line numbers as well as the error id (eg Fatal error)? Quote Link to comment https://forums.phpfreaks.com/topic/195298-error-codes/#findComment-1026391 Share on other sites More sharing options...
KevinM1 Posted March 15, 2010 Share Posted March 15, 2010 And this error handler would have the caability of detecting file and line numbers as well as the error id (eg Fatal error)? Why don't you try it and see? Quote Link to comment https://forums.phpfreaks.com/topic/195298-error-codes/#findComment-1026393 Share on other sites More sharing options...
canadabeeau Posted March 15, 2010 Author Share Posted March 15, 2010 I would rather if someone knew and just say yes or no, not necessarily how so I dont waste my time Quote Link to comment https://forums.phpfreaks.com/topic/195298-error-codes/#findComment-1026394 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.