.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt =================== EXT: Debug Mysql DB =================== :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed by: Holzinger Franz :Changed: 2013-12-19T14:13:13 :Classification: debug_mysql_db :Keywords: forDevelopers, forIntermediates :Author: Stefan Geith :Email: typo3dev2009@geithware.de :Info 4: :Language: en |img-1| |img-2| EXT: Debug Mysql DB - debug\_mysql\_db .. _EXT-Debug-Mysql-DB: EXT: Debug Mysql DB =================== Extension Key: debug\_mysql\_db Language: en Keywords: forDevelopers, forIntermediates Copyright 2009-2013, Stefan Geith, This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml The content of this document is related to TYPO3 \- a GNU/GPL CMS/Framework available from www.typo3.org .. _Table-of-Contents: Table of Contents ----------------- `EXT: Debug Mysql DB 1 <#__RefHeading__966_168664116>`_ **`Introduction 3 <#__RefHeading__968_168664116>`_** `What does it do? 3 <#__RefHeading__970_168664116>`_ `Screenshots 3 <#__RefHeading__972_168664116>`_ **`Users manual 4 <#__RefHeading__974_168664116>`_** **`Administration 5 <#__RefHeading__976_168664116>`_** `Reference 5 <#__RefHeading__978_168664116>`_ **`Known problems 6 <#__RefHeading__980_168664116>`_** **`To-Do list 7 <#__RefHeading__982_168664116>`_** **`ChangeLog 8 <#__RefHeading__984_168664116>`_** .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ - It transforms SQL error messages into debug messages or any function of your choice. This helps you to get rid of the output of SQL error messagein the Frontend or Backend. - It calculates the time for the performance of a SQL query. - You can filter to see only buggy SQL queries. - You can filter to see only SQL queries which take a long time. .. _Screenshots: Screenshots ^^^^^^^^^^^ |img-3| .. _Users-manual: Users manual ------------ Just install the extension in the Extension Manager. Then all database queries made by the PHP code of TYPO3 or of all TYPO3 extensions which use the $TYPO3\_DB object to make the database calls, will be caught , they are checked for errors and time measurements are done on them. The result of the database queries can be seen directly on the TYPO3 site. But you can configure it to use any functions like sending via email or storing it into a file. An easier method is to use an additional debug extension as fh\_debug, beko\_debugster or cc\_debug with it. By using those extensions you can get a better and more understandable output. .. _Administration: Administration -------------- All administration is don e in the Extension Manager. .. _Reference: Reference ^^^^^^^^^ Extension Manager setup .. ### BEGIN~OF~TABLE ### .. _TYPO3-MODE: TYPO3\_MODE """"""""""" .. container:: table-row Property TYPO3\_MODE Data type text Description Typo3 Mode: FE, BE, ALL or OFF. Normaly set to FE to enable all FE- Plugins SQL-Queries !!!!! Debugging only enabled in this Mode. Use BE only with caution. Use ALL if you are unsure what you shall configure here and want to be certain to get output from this extension under all circumstances. Default FE .. _DISABLE-ERRORS: DISABLE\_ERRORS """"""""""""""" .. container:: table-row Property DISABLE\_ERRORS Data type integer Description Disable mysql errormessages: Normally all mysql\_errors() that occur will be displayed. Set to 1 to disable. Default 1 .. _QUERIES: QUERIES """"""" .. container:: table-row Property QUERIES Data type text Description Comma-sep. list of queries: 'All' for all types of queries. 'None' for none. ALL, SQL (only sql() and sql\_query() ), SELECT, UPDATE, INSERT, DELETE Default ALL .. _TABLES: TABLES """""" .. container:: table-row Property TABLES Data type text Description Comma-sep. list of tables: 'ALL' for all tables. 'None' for none. List of tables that generate debug-messages. Default ALL .. _PAGES: PAGES """"" .. container:: table-row Property PAGES Data type text Description Comma-sep. list of Page-IDs: 0 for all pages. -1 for none. Else list Page-IDs where debug-output has to be generated. Default ALL .. _FEUSERS: FEUSERS """"""" .. container:: table-row Property FEUSERS Data type text Description Comma-sep. list of FeUser-IDs: 0 or empty for all fe\_users (even without login). Else list FeUser-IDs where debug-output has to be generated. Default 0 .. _BTRACE-SQL: BTRACE\_SQL """"""""""" .. container:: table-row Property BTRACE\_SQL Data type integer Description Add Backtrace: Set to 1, if you need debug\_backtrace for all sql() and sql\_query() calls Default .. _OUTPUT: OUTPUT """""" .. container:: table-row Property OUTPUT Data type text Description Output: Destination of the debug info. possible Values: \TYPO3\CMS\Utility\DebugUtility::debug, debug, error\_log (see TEXTFORMAT) :: OUTPUT = \TYPO3\CMS\Utility\DebugUtility::debug Default \TYPO3\CMS\Utility\DebugUtility::debug .. _TEXTFORMAT: TEXTFORMAT """""""""" .. container:: table-row Property TEXTFORMAT Data type boolean Description If set, then all the internal debug array is transformed into a normal text before output. This is needed for debug functions which are not able to deal with an array. E.g. if you use error\_log as the output method (see OUTPUT), then you must have set this to 1. Default 0 .. _TCA: TCA """ .. container:: table-row Property TCA Data type boolean Description Defines that the $TCA for a table must be set to generate an output. Default 0 .. _TICKER: TICKER """""" .. container:: table-row Property TICKER Data type float Description Ticker: Minimum time in miliseconds for the duration of SQL queries which should be reported. Default .. ###### END~OF~TABLE ###### [EM] .. _generated: ((generated)) """"""""""""" .. _Example: Example ~~~~~~~ Install the extension fh\_debug and activate the output of it. Now you will see no output of the debug messages. The debug is written into a defined HTML file Instead to the website. Open the HTML file into a browser's tab to show the debug output. :: OUTPUT = debug .. _Example: Example ~~~~~~~ If you only want textual output instead of an array. Activate the error\_log output in your file /etc/php.ini and the display of big lines php.ini: :: log_errors = On error_log = /var/www/html/error_log log_errors_max_len = 1024 Extension Manager for debug\_mysql\_db: :: TEXTFORMAT is checked OUTPUT = error .. _Known-problems: Known problems -------------- It uses a method to enhance the TYPO3 Core class DatabaseConnection. This could lead to an unknown side effect in an error case. Then some data could get lost. .. _To-Do-list: To-Do list ---------- support of DBAL .. _ChangeLog: ChangeLog --------- - Make it running under TYPO3 6.0, 6.1 and 6.2 - Add all new methods of the class t3lib\_DB from TYPO3 4.3 8 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. |img-2| image:: img-2.png .. :border: 0 .. :height: 21 .. :hspace: 9 .. :id: Grafik2 .. :name: Grafik2 .. :width: 87 .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :height: 437 .. :id: images1 .. :name: images1 .. :width: 669