I've got an issue running my ownCloud instance on a Synology NAS. I get to following log error:
PHP Startup: No such handler: DBA_DEFAULT at Unknown#0
... which should be about the connection to the database. It is very confusing, because the database can be called by ownCloud, all connected clients work, the web interface works and so on... Only this message remains.
My configuration details:
I can find absolutely no information about that error...
I've been seeing this message on my Synology NAS recently and this is what I've found. My NAS has multiple Php installations, and I think this error is coming from the default installation.
root@synology:~# /bin/php --ri dba
Extension 'dba' not present.
but using my alternate php
root@synology:~# /usr/local/bin/php56 --ri dba
dba
DBA support => enabled
Supported handlers => gdbm cdb cdb_make db4 inifile flatfile
Directive => Local Value => Master Value
dba.default_handler => flatfile => flatfile
So one solution is to ensure that your application is invoking the correct Php version. For this you can manage the HTTP server and PHP version from the Synology Web Station.
Alternately I noticed that this message is E_WARNING
level only and can be ignored (unless you need Berkley Database). I added this code to my application
function shutdownHandler()
{
try {
$error = error_get_last();
if ( $error !== NULL && $error["type"] == E_ERROR) {
$backtrace = "(E_ERROR) " . $error["message"];
$trace = debug_backtrace();
foreach($trace as $item) {
$backtrace .= "\n\t" . (isset($item['file']) ? $item['file'] : '<unknown file>')
. ' ' . (isset($item['line']) ? $item['line'] : '<unknown line>')
. ' calling ' . (isset($item['function']) ? $item['function'] : '<unknown function>') . '()';
}
\Logger::LogError( $backtrace, $error["file"], $error["line"]);
}
}
catch (Exception $e) {
print get_class($e)." thrown within the shutdown handler. Message: ".$e->getMessage()." on line ".$e->getLine();
}
}
# Registering shutdown function
register_shutdown_function('shutdownHandler');
I'm guessing ownCloud has a similar function, but it is probably logging all error messages, which is why you are seeing this message.