====== Debugging ====== There are several things that can cause errors on your site. Before requesting assistance in the forums, it is helpful to understand and them and attempt to narrow down the issue. ===== Cannot Login ===== Turn debug mode on and also check ///path/to/getsimple/data/other/logs/errorlog.txt// for errors Report these in forums, make note of any recent changes and plugins in use especially user related ones, like ktblock and multi users. ===== White Screen with no output ===== This is commonly referred to as PHP white screen of death. It typically occurs when php error reporting is off, but can occur even when it is on. This is usually the result of a fatal php compile error, eg. missing function, missing required file, or a syntax error etc. The best way to check this is to enable debugmode in gsconfig and check for output again. PHP will throw errors with details that may even include the file and line number the error occurs on. As you can imagine this greatly helps troubleshoot these issues. To turn on debugging, uncomment the GSDEBUG line in /path/to/getsimple/gsconfig.php to enable full PHP errors output to help debug in your browser. ===== The error log ===== All PHP errors are also written to a log,regardless of the GSDEBUG setting, check /path/to/getsimple/**data/other/logs/errorlog.txt** Hint: you can also write your own debug messages to the error log, just use the built-in php function **error_log("My debug message")**.\\ Do not forget to remove your error_log() commands when troubleshooting is finished, so as not to constantly fill up the error log! ===== 500 error in browser ===== This can also be caused by a fatal or compile fail PHP error, checking the errorlog is typically required here as no output will be available on compile errors in php. The best place to find out absolutely what caused this is to check your host webserver error log, your host usually provides this in your control panel or ftp log folder. This file will reveal any issue with a bad .htaccess file or misconfiguration. The next thing to suspect after php is .htaccess if you are on apache. Through the process of elimination comment line in your main .htaccess file or rename it temporarily to see if the issue gets resolved. ===== Ugly PHP notices and warning errors in browser ===== These are non fatal warnings and notices just as they say, they are typically ignored when php error reporting is turned off or debug mode is off. Error reporting should never be enabled on a production server, if you see these errors on a live site have your host disable php errors. We do provide GSSUPPRESSERRORS in gsconfig and will attempt to shunt these errors if you specify. These kinds of notices typically alert you to possible issues in the php script. ===== Client Side Javscript errors ===== These are usually noted by missing elements on a page, or non responsive buttons etc. Check your browsers development console to detect these. ===== Enabling debug mode ===== Open gsconfig.php, this file should be in the root of your GetSimple installation. (If you only have temp.gsconfig.php rename it to gsconfig.php and open that one.) Search for this line: #define('GSDEBUG', TRUE);. Remove the #-sign. ===== Disabling debug mode ===== Open gsconfig.php, this file should be in the root of your GetSimple installation. (If you only have temp.gsconfig.php rename it to gsconfig.php and open that one.) Search for this line: define('GSDEBUG', TRUE);. Add a #-sign in front of the line. Note: Setting GSDEBUG to FALSE does not disable debug mode in GetSimple versions prior to 2.03. ===== How do I know if debug mode is enabled? ===== When you are logged in to your admin panel it will display a small red notice in the top-right corner. {{:debug-mode.jpg?300|}} ===== When should I enable debug mode? ===== If you want to see PHP errors displayed on the website you will need to enable debug mode. This would apply to you if you are working with PHP, for instance when developing a theme or plugin . We also urge you to enable debug mode if you go looking for help on this forum. “White pages” or missing content can be signs of fatal PHP errors. It is easier to get to the bottom of a problem if you provide us with the error messages and those only show if debug mode is enabled. ===== Reporting issues in forums, or requesting assistance ===== **DO NOT PRIVATE MESSAGE ADMINISTRATORS FOR ASSISTANCE UNLESS TOLD TO** This is a bannable offense GetSimple is an open source and free, volunteer supported application. Thanks to an incredible community of knowledgeable folks, forum member-to-member assistance is typically very quick and effective, most problems are solved quickly, provided that users are as respectful and helpful in reporting them. Please keep this in mind when interacting with the community and always help by posting any solutions you find on your own, it will most likely help someone else. Also please submit issues of things you encounter that may be confusing or you had trouble understanding so they can be addressed in future versions. You may want to read this entire page(scroll to top) as it describes specific steps to troubleshoot common issues. Check Health Check [[http://get-simple.info/wiki/how_to:support#website_health_check]] Post your issue in the appropriate forum. First check ///path/to/getsimple/data/other/logs/errorlog.txt// for errors, also turn debug mode on and check for error output on the page. If you can login check health check and note anything not marked OK If you php errors that say fatal, these are important ones to mention, others will help also. If you see a filename in the error that is in the plugins folder, report the issue to the specific support thread for THAT PLUGIN if you can determine, it is likely a plugin error and possibly known issue and you will receive much better support, otherwise post in the general questions/ problems thread. It is also useful to check your hosts error logs, as they will show configuration issues and causes of 500 errors and 403 errors, which are sometimes causes by security blocking software on your host. Mark your post with issue or question depending on the nature of the issue. Always post * Version of PHP * Your platform, windows etc. * If your host is a special one, free or cloud based or lamp/wamp * Always post your GS version * If plugin check that they are up to date and supported in the gs version as noted in extend * Note what you have already tried, changed permissions, reinstall etc. * How to reproduce if you suspect it is a repeatable bug and have steps to reproduce * Try to isolate problem, disable any new plugins, or all one by one ( manually override by editing plugins.xml ) and note changes * Post information on your setup, how many pages, plugins installed, special languages? * Did it work before, is this sudden, is this new, did you do anything? * Save everyone's time by doing due diligence to solve issues on your own, search the wiki and search the forum for same issue, everyone here is a volunteer, no-one owes you anything, nor will you get much help you if your post consists of "it does not work" or "is broken" * screenshots are welcome, especially if english is not your primary language, or your issue is difficult to explain.