diff options
| author | Christophe Nowicki <cnowicki@easter-eggs.com> | 2004-09-16 15:57:55 +0000 |
|---|---|---|
| committer | Christophe Nowicki <cnowicki@easter-eggs.com> | 2004-09-16 15:57:55 +0000 |
| commit | 40940b95aaefd87f9af96439669cc6cb184d69ef (patch) | |
| tree | f0d65eaa1369aeaca88f5774f2ca2cba4932ca27 /php/Attic/examples/sample-idp/soapEndpoint.php | |
| parent | 7ea2275ca076a880c27448cdbdfe09ffa9f15db8 (diff) | |
| download | lasso-40940b95aaefd87f9af96439669cc6cb184d69ef.tar.gz lasso-40940b95aaefd87f9af96439669cc6cb184d69ef.tar.xz lasso-40940b95aaefd87f9af96439669cc6cb184d69ef.zip | |
New logging system with a web interface.
Diffstat (limited to 'php/Attic/examples/sample-idp/soapEndpoint.php')
| -rw-r--r-- | php/Attic/examples/sample-idp/soapEndpoint.php | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/php/Attic/examples/sample-idp/soapEndpoint.php b/php/Attic/examples/sample-idp/soapEndpoint.php index 7a7f8f09..887a5063 100644 --- a/php/Attic/examples/sample-idp/soapEndpoint.php +++ b/php/Attic/examples/sample-idp/soapEndpoint.php @@ -22,13 +22,19 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - require_once 'DB.php'; require_once 'Log.php'; + require_once 'DB.php'; header("Content-Type: text/xml\r\n"); + + // connect to the data base + $db = &DB::connect($config['dsn']); + if (DB::isError($db)) + die("Could not connect to the database"); - // create logger - $logger = &Log::factory($config['log_handler'], '', $config['log_name']."::".$_SERVER['PHP_SELF']); + // create logger + $conf['db'] = $db; + $logger = &Log::factory($config['log_handler'], 'log', $_SERVER['PHP_SELF'], $conf); if (empty($HTTP_RAW_POST_DATA)) { @@ -45,15 +51,6 @@ $requestype = lasso_getRequestTypeFromSoapMsg($HTTP_RAW_POST_DATA); $server = LassoServer::newFromDump($server_dump); - $db = &DB::connect($config['dsn']); - - if (DB::isError($db)) - { - $logger->log("DB Error :" . $db->getMessage(), PEAR_LOG_ALERT); - $logger->log("DB Error :" . $db->getDebugInfo(), PEAR_LOG_DEBUG); - die("Could not connect to the database"); - } - switch ($requestype) { // Login |
