Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // WordPress logging of errors and amount of queries
- ini_set('log_errors',TRUE);
- ini_set('display_errors', FALSE);
- ini_set('error_reporting', E_ALL);
- ini_set('error_log', dirname(__FILE__) . '/error-logs/php.log');
- if (!file_exists(dirname(__FILE__) . '/error-logs') && is_writable(dirname(__FILE__))) {
- mkdir(dirname(__FILE__) . '/error-logs');
- }
- if (file_exists(dirname(__FILE__) . '/error-logs') && !file_exists(dirname(__FILE__) . '/error-logs/.htaccess')) {
- file_put_contents(dirname(__FILE__) . '/error-logs/.htaccess', "AuthType Basic\nAuthName \"Restricted Access\"\nAuthUserFile .htnopasswd\nAuthGroupFile /dev/null\nRequire valid-user");
- }
- define('SAVEQUERIES', true);
- function debugShutdown()
- {
- global $wpdb;
- error_log('DB Queries: '.count($wpdb->queries));
- }
- register_shutdown_function('debugShutdown');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement