watchdog('CreateAccount', 'custom', array('test'), WATCHDOG_DEBUG, $link = NULL);
dpm() Devel print message
dvm() Devel variable message
dpr() Devel Pretty-print
dvr() Devel pretty-variable
kpr() Devel Krumo Pretty-print
dargs() Devel args pass to function with Krumo
dd() Logs any variable to a file named “drupal_debug.txt” in the site’s temp directory
ddebug_backtrace()
db_queryd()
dfb() Devel fire bug; write to drupal console of firebug
firep() Devel fire bug; write to firebug console
var_dump($_SESSION[CiviCRM][ufID]);
var_dump($_SESSION[CiviCRM][userID]);
&smartyDebug=1
MRC_core_SetStatus 'Message';
Echo ‘\n’, print
print_r('CURRENT Membership');
CRM_Core_Error::debug( $memParams, $variable = null, $log = true, $html = true); exit;
drupal_set_message(var_dump($instance), 'error');
var_dump(array);
print ‘test’;
print_r (array(‘test’));
Debug Commands
Smarty Debug Window - Loads all variables available to the current page template into a pop-up
window. To trigger, add '&smartyDebug=1' to any CiviCRM URL query string.
Session Reset - Resets all values in your client session. To trigger, add '&sessionReset=2'
Directory Cleanup- Empties template cache and/or upload file folders.
To empty template cache (civicrm/templates_c folder), add '&directoryCleanup=1'
To remove temporary upload files (civicrm/upload folder), add '&directoryCleanup=2'
To cleanup both, add '&directoryCleanup=3'
Stack Trace - To display stack trace at the top of the page when an error occurs, set Enable Backtrace from Administer » System Settings » Debugging and Error Handling
PHP test online
On terminal: php -a
writecodeonline.com/php
Mysql sur mon ordinateur Unbuntu
Mysql –user=root –pasword=coco
Change folder to locate sql file: backup.sql
Start Mysql and change database: use backup
Source backup.sql
Restore
Mysql –u adminroger –ppwd backup <backup.sql