♥FWR Media Posted January 28, 2010 Share Posted January 28, 2010 (edited) KissER Error Handling & Debugging a KISS contribution ( Keep It Simple Stupid ) Compatibility: osCommerce ( MS2.2/RC ALL ) PHP5.2+/5.3+ ( PHP 4 NOT supported ) Installation: Simple 2-3 minutes Potential code conflicts: Effectively none the one exception would be if the tep_db_query() function had been modified for Chemos old query debug. What is it and what will it do for me? Main Benefits: Would you like to be able to find and handle errors that your site is currently hiding/suppressing? Would you like to have a file to check to see if your site has any errors while at the front end the users see nothing? Ever been developing a site and would like to see errors without them breaking up the page? Ever wanted to look for errors but don't want to "turn up" the error reporting because users would see them? Ever wanted to show a new client just how many errors their current osCommerce site has but they can't see? Would you like to stop errors from printing out full paths in view of the hacking world? Would you like to easily be able to debug: queries, variables, arrays, objects or site slowdowns? Gracefull Error Handling: Disclaimer: Some PHP errors like parse errors and fatal errors can NOT be handled gracefully. osCommerce has nothing in place at all to deal with errors, either you suppress errors ( error_reporting ( E_ALL & ~E_NOTICE ) ) which is the standard osCommerce set up. Or you set error reporting high ( error_reporting ( E_ALL | E_STRICT ) ) and the site falls apart with errors all over the shop. ( obviously not possible on a live site ). Understandably because of this the vast majority of osCommerce installations suppress all errors. What this means is that most osCommerce installations have tons of errors but the owners of the sites are happily ignorant of this fact. You will probably be surprised to know that some shops even suppress warnings, terrible! Also, when errors print to screen via standard PHP error handling they show your servers full path which is a potential serious security risk, KissER suppresses these full paths. There are those ( usually contributors of dodgy contributions or incapable developers ) who would tell you "don't worry about those, they are only notices .. they're fine!", rubbish!, errors are errors and a good shop should have none. An error free shop will be faster, more secure and easier to debug. Ignore errors at your peril! Think your site is error free? I very much doubt it! But the last thing I want my users to see is errors!! Agreed .. which is why KissER Error Handling & Debugging has settings where these errors can be printed to screen but only visible to you, or silently written to an error file where you can view and handle them at your leisure. Debugging: Powerful set of simple to use debugging tools where you can easily debug: - queries variables arrays objects You can also use "break points" to locate where a site is slowing down or breaking. Download the current version Edited January 28, 2010 by FWR Media zeemedia 1 Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
moezbud Posted February 3, 2010 Share Posted February 3, 2010 (edited) Unfortunately, I'm not much of a PHP programmer... so, this may be a dumb question. Is there any way to make this compatable with PHP 4.xx? Thanks! Edited February 3, 2010 by moezbud Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted February 3, 2010 Author Share Posted February 3, 2010 Unfortunately, I'm not much of a PHP programmer... so, this may be a dumb question. Is there any way to make this compatable with PHP 4.xx? Thanks! No sorry. I have no interest in supporting PHP 4, it is dead and gone. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
modem2.0 Posted February 3, 2010 Share Posted February 3, 2010 I Robert, Thanks for this awesome contribution, keep up the good work. In the installation you say for application_top.php file Find ( near the top ) ... // set the level of error reporting error_reporting(E_ALL & ~E_NOTICE); Replace with ... // set the level of error reporting error_reporting(E_ALL & ~E_NOTICE); // KISS Error Handling & Debugging by FWR Media include_once 'includes/kiss_error_handler.php'; I mean, you are saying to replace error_reporting(E_ALL & ~E_NOTICE); with the same code. Is this a bug? Did you want to say something else or it is correct? Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted February 3, 2010 Author Share Posted February 3, 2010 (edited) I Robert, Thanks for this awesome contribution, keep up the good work. In the installation you say for application_top.php file Find ( near the top ) ... // set the level of error reporting error_reporting(E_ALL & ~E_NOTICE); Replace with ... // set the level of error reporting error_reporting(E_ALL & ~E_NOTICE); // KISS Error Handling & Debugging by FWR Media include_once 'includes/kiss_error_handler.php'; I mean, you are saying to replace error_reporting(E_ALL & ~E_NOTICE); with the same code. Is this a bug? Did you want to say something else or it is correct? Hi May look odd but it is correct. I find people make less mistakes when you "replace" code rather than "add above" or "add below". It certainly isn't a bug as it just replaces the same code and adds a bit below. E.g. if you hadn't actually looked at the code you would have simply replaced the one with the other. Had it been an "add below" you would have had to think about it. Edited February 3, 2010 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Guest Posted February 3, 2010 Share Posted February 3, 2010 Think your site is error free? I very much doubt it! Download the current version You are sooooo right.. I'm now using this contribution and it is very helpful when I try to get rid of all errors, and that's NOT one or two.. Quote Link to comment Share on other sites More sharing options...
modem2.0 Posted February 6, 2010 Share Posted February 6, 2010 You are sooooo right.. I'm now using this contribution and it is very helpful when I try to get rid of all errors, and that's NOT one or two.. I agree... I even found that the total module cash on delevery with fee was not deleting all the keys when pressing the remove module name. I had 2 keys 9 times each in the database... Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted February 6, 2010 Author Share Posted February 6, 2010 Well this is nice early feedback .. seems people are enjoying it or at least finding it useful. What I find with contributions like this and Security Pro is they don't tend to get noticed unless people have problems. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Stealth1 Posted February 9, 2010 Share Posted February 9, 2010 Is it recommended to remove the install of Chemo's query mod before installing this? Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted February 9, 2010 Author Share Posted February 9, 2010 Is it recommended to remove the install of Chemo's query mod before installing this? Yes, the code in the tep_db_query() function may conflict. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
bonester1981 Posted February 9, 2010 Share Posted February 9, 2010 Hi, I am testing this contribution and find it very useful. I like your contribs, thanks for that! :) Everything works fine, except this: Error: Undefined index: break File: includes/kiss_error_handler.php Line: 316 E_WARNING Error Count: 1 Error: Invalid argument supplied for foreach() File: includes/kiss_error_handler.php Line: 316 My configuration: PHP Version 5.2.12 Linux Kind regards Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted February 9, 2010 Author Share Posted February 9, 2010 Hi, I am testing this contribution and find it very useful. I like your contribs, thanks for that! :) Everything works fine, except this: Error: Undefined index: break File: includes/kiss_error_handler.php Line: 316 E_WARNING Error Count: 1 Error: Invalid argument supplied for foreach() File: includes/kiss_error_handler.php Line: 316 My configuration: PHP Version 5.2.12 Linux Kind regards Interesting .. KissER reporting itself for errors :rolleyes: catalog/includes/kiss_error_handler.php Line 76 should be .. private static $breakpoints = array( 'break' => array() ); Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Stealth1 Posted February 10, 2010 Share Posted February 10, 2010 Installed and working great! another amazing contribution FWR! Guessing I should start a seperate thread to get help on fixing the errors I have Quote Link to comment Share on other sites More sharing options...
Guest Posted February 10, 2010 Share Posted February 10, 2010 I'm getting too much E_NOTICE errors filling up the log-file, so I made a litle switch: On top of catalog/includes/kiss_error_handler.php: define('KISS_ERROR_REPORTING_SKIP', 'E_NOTICE'); Around line 279 I have made this changes: if ($error_type <> KISS_ERROR_REPORTING_SKIP) { $error_string = 'Date / Time: ' . date("d-m-Y H:i:s") . PHP_EOL; $error_string .= 'Error Type: [' . $error_type . '] ' . $detail['string'] . PHP_EOL; $error_string .= 'On line ' . $detail['line'] . PHP_EOL . 'File ' . $detail['file'] . PHP_EOL; $error_string .= str_repeat( '-+', 30 ) . PHP_EOL . PHP_EOL; $this->writeToFile( $error_string ); } Is this ok, or do you have a better way to do this? (It is working) Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted February 10, 2010 Author Share Posted February 10, 2010 I'm getting too much E_NOTICE errors filling up the log-file, so I made a litle switch: On top of catalog/includes/kiss_error_handler.php: define('KISS_ERROR_REPORTING_SKIP', 'E_NOTICE'); Around line 279 I have made this changes: if ($error_type <> KISS_ERROR_REPORTING_SKIP) { $error_string = 'Date / Time: ' . date("d-m-Y H:i:s") . PHP_EOL; $error_string .= 'Error Type: [' . $error_type . '] ' . $detail['string'] . PHP_EOL; $error_string .= 'On line ' . $detail['line'] . PHP_EOL . 'File ' . $detail['file'] . PHP_EOL; $error_string .= str_repeat( '-+', 30 ) . PHP_EOL . PHP_EOL; $this->writeToFile( $error_string ); } Is this ok, or do you have a better way to do this? (It is working) If the log file is filling up then you really shouldn't be logging the errors to file. The log file is there for when you are just about error free and you want to find any errors that crop up over time. If you are still working on the errors then use the screen method but remember to set .. KISS_ERROR_REPORTING_GET_SWITCH This way only you will see the errors printed to screen. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
erikesq777 Posted February 10, 2010 Share Posted February 10, 2010 (edited) I saw my error after posting this message. Thanks Edited February 10, 2010 by erikesq777 Quote Link to comment Share on other sites More sharing options...
richcduk Posted February 12, 2010 Share Posted February 12, 2010 Awsome contibution. Best yet ! no more scratching of head !!! :thumbsup: Quote Link to comment Share on other sites More sharing options...
parksey Posted February 13, 2010 Share Posted February 13, 2010 Hi Rob Great Contrib !! And thanks for sharing. But should I really go through and fix all undefined variable errors? most people just knock down the reporting level to ignore these? cheers rhys Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted February 13, 2010 Author Share Posted February 13, 2010 Hi Rob Great Contrib !! And thanks for sharing. But should I really go through and fix all undefined variable errors? most people just knock down the reporting level to ignore these? cheers rhys Errors are errors. You are right, most people just knock down the error reporting "what I can't see can't hurt me", this is a very bad practice, errors should never be ignored. Error free sites are more secure, easier to debug and faster. Undefined variables show shoddy coding and are a route to hacking. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
moezbud Posted February 19, 2010 Share Posted February 19, 2010 I hope that this is not a dumb request.... but, what the heck - I have to admit to not being very bright when it comes to this... I have installed this contribution and it has already helped me quite a bit. However, right now I am trying to determine logical errors. For example, I am tring to install paypal IPN and the orders are double posting on my orders table. With this, I am trying to see exactly which module is processing a given query (i.e. is it happening in checkout_confirmation.php, orders.php, general.php, etc.). I can see that all of these queries are occuring, but I'm having difficulty zeroing in on my culprit modules. Is it possible to add a line that would show the calling module (and ideally the line) where things are happening? If so, can you give me some idea of how to do it? Thanks! Quote Link to comment Share on other sites More sharing options...
kanata_82 Posted February 20, 2010 Share Posted February 20, 2010 Does my SEO improve from this addon? What things are getting better to? Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted February 21, 2010 Author Share Posted February 21, 2010 I hope that this is not a dumb request.... but, what the heck - I have to admit to not being very bright when it comes to this... I have installed this contribution and it has already helped me quite a bit. However, right now I am trying to determine logical errors. For example, I am tring to install paypal IPN and the orders are double posting on my orders table. With this, I am trying to see exactly which module is processing a given query (i.e. is it happening in checkout_confirmation.php, orders.php, general.php, etc.). I can see that all of these queries are occuring, but I'm having difficulty zeroing in on my culprit modules. Is it possible to add a line that would show the calling module (and ideally the line) where things are happening? If so, can you give me some idea of how to do it? Thanks! This is where you can use the "break points" add breakpoints to the files in question and see at which points these queries occur. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
deaconest Posted March 19, 2010 Share Posted March 19, 2010 (edited) Hello, Quick question, When I installed this contribution, I get only blank pages. Doesnt seem to matter what I set the handler thing to. EDIT: Ok just tell me this if my host is still using php 4.4.9 will this program work? Edited March 19, 2010 by deaconest Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted March 19, 2010 Author Share Posted March 19, 2010 Hello, Quick question, When I installed this contribution, I get only blank pages. Doesnt seem to matter what I set the handler thing to. EDIT: Ok just tell me this if my host is still using php 4.4.9 will this program work? Not a hope. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
deaconest Posted March 19, 2010 Share Posted March 19, 2010 Thats what I thought Thanks Quote Link to comment 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.