// $Id: install.php,v 1.1 2004/07/23 00:22:13 tomas Exp $ require_once 'example/conf.php'; require_once 'DB.php'; require_once 'alib.php'; function errCallback($err) { if(assert_options(ASSERT_ACTIVE)==1) return; echo "
\n"; echo "request: "; print_r($_REQUEST); echo "gm:\n".$err->getMessage()."\ndi:\n".$err->getDebugInfo()."\nui:\n".$err->getUserInfo()."\n\n"; exit; } PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s
if($_REQUEST['ak']=='inst'){ $dbc->setErrorHandling(PEAR_ERROR_RETURN); # $dbc->setErrorHandling(PEAR_ERROR_PRINT, "%sInstall/reinstall !
\n"); echo "Trying to uninstall all ...\n"; $alib->uninstall(); $dbc->setErrorHandling(PEAR_ERROR_PRINT, "%s
\n"); # $dbc->setErrorHandling(PEAR_ERROR_CALLBACK, 'errCallback'); echo "Install ...\n"; $alib->install(); echo "Testing ...\n"; $alib->test(); $log = $alib->test_log; echo "TESTS:\n$log\n---\n"; echo "Reinstall + testdata insert ...\n"; $alib->reinstall(); $alib->testData(); echo "TREE DUMP:\n"; echo $alib->dumpTree(); echo "\nAlib is probably installed OK\n\n\n"; } $dbc->disconnect(); ?>