Using midgard-php from the command line

David Schmitter <[email protected]> Sat, 08 Oct 2005 15:27:54 +0200
Newsgroups gmane.comp.web.midgard.user
Message-ID <[email protected]>
Hello

How am I supposed to run Midgard from the command line?

I have got the following test script:

#!/usr/bin/php
<?
mgd_config_init('midgard.conf');
$midgard = mgd_get_midgard();
print_r($midgard);
echo mgd_errstr();
?>

While /etc/midgard/conf.d/midgard.conf looks as follows:

Name=midgard
Username=midgard
Password=midgard

midgard:midgard is a valid login for database midgard on localhost.

When I run the test script, Mysql records a successful connection in its
log.

However, the script says:

"Not connected to the Midgard database"

I am using Midgard from CVS with php 4.3.10.

Thanks for any hints.

David