Debugging Poweradmin¶
To help diagnose issues, you can enable various debug settings in your Poweradmin configuration. Below are the available debug settings and how to enable them.
Configuration Location¶
Debugging settings should be added to your config/settings.php file. The legacy inc/config.inc.php format and its migration script were removed in 4.1.0, so config/settings.php is the only configuration file on current releases.
Available Debug Settings¶
1. PHP Error Reporting¶
To display PHP errors directly in the browser, add the following lines to your index.php or any other entry point file:
2. Logger Settings¶
Configure the logging settings in your config/settings.php:
return [
// Other settings...
'logging' => [
'type' => 'native', // Options: 'null', 'native'
'level' => 'debug', // Options: 'debug', 'info', 'notice', 'warning', 'error', 'critical', 'alert', 'emergency'
// Other logging settings...
],
// Other settings...
];
These settings are primarily used for logging authentication issues and other system events.
3. Database Debugging¶
Enable or disable database debugging to log detailed database operations and errors:
return [
// Other settings...
'database' => [
// Other database settings...
'debug' => true, // Show all SQL queries
],
// Other settings...
];
4. DNSSEC Debugging¶
Enable or disable DNSSEC debugging to log detailed DNSSEC operations and errors:
return [
// Other settings...
'dnssec' => [
// Other DNSSEC settings...
'debug' => true, // Enable DNSSEC debug logging
],
// Other settings...
];
5. LDAP Debugging¶
Enable or disable LDAP debugging to log detailed LDAP operations and errors:
return [
// Other settings...
'ldap' => [
// Other LDAP settings...
'debug' => true, // Enable LDAP debug logging
],
// Other settings...
];
Display Statistics¶
To see memory usage and execution time at the bottom of each page, enable the display_stats option:
return [
// Other settings...
'misc' => [
// Other miscellaneous settings...
'display_stats' => true, // Display memory usage and execution time
],
// Other settings...
];
By enabling these settings, you can gain more insight into the application's behavior and troubleshoot issues more effectively.
Common Configuration Issues¶
Password Character Issues¶
If you experience PHP syntax errors when generating configuration files during installation, check your passwords for problematic characters:
Symptoms:
- Installation fails with PHP parse errors
- Configuration file cannot be parsed
- "Access denied for user" errors after successful installation test
Solution: Avoid these characters in database, LDAP, and SMTP passwords:
- Single quotes (
') - Double quotes (
") - Backslashes (
\) - Line breaks
Example Error:
Debugging Steps:
- Check your password for the problematic characters listed above
- Use
var_dump(ConfigurationManager::getInstance()->getAll())to inspect parsed configuration values - Look for missing quotes or escape characters in the output
- Change the password to use only alphanumeric characters and basic symbols
This issue occurs because the configuration file generator does not properly escape special PHP characters in password values during installation.
PowerDNS Answers REFUSED for Public Names¶
Names inside your zones resolve, but dig @your-server example.com or any other
public name returns REFUSED. This is how PowerDNS Authoritative Server works:
it answers only for the zones it holds and never recurses. No Poweradmin setting
changes that, and neither do secondary zones or supermasters; a secondary zone
transfers one zone in, and a supermaster only auto-creates secondary zones when a
listed primary sends a NOTIFY.
If clients need both your zones and the public internet, run a resolver in front
(PowerDNS Recursor, Unbound, BIND), point the clients at it, and forward only your
own zones to the authoritative server. The old recursor= option in pdns.conf
was removed in PowerDNS Authoritative 4.1.