Hi,
It looks correct to me. If it doesn't work, try php's PDO with that dsn
as well, perhaps it will tell you what went wrong if ar\connect\db
doesn't. Although the result $db should be an error if the connection
failed. You can check it like this:
$db = ...;
if ( ar('error')->isError( $db ) ) {
echo 'Error: '.$db;
}
regards,
Auke van Slooten
Muze
Ps. there is a bug in ar('error'), if you need to use ar('error')
multiple times in a single template you should assign it to a temporary
variable and use that, as it sometimes gets corrupted after the first
call. So do this:
$error = ar('error');
if ( $error->isError($db) ) {
...