diff --git a/livesupport/modules/archiveServer/var/conf.php b/livesupport/modules/archiveServer/var/conf.php
index 5acf88527..cbd4bf93a 100644
--- a/livesupport/modules/archiveServer/var/conf.php
+++ b/livesupport/modules/archiveServer/var/conf.php
@@ -23,7 +23,7 @@
Author : $Author: tomas $
- Version : $Revision: 1.4 $
+ Version : $Revision: 1.5 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/conf.php,v $
------------------------------------------------------------------------------*/
@@ -62,18 +62,19 @@ $config = array(
'bufferDir' => dirname(getcwd()).'/stor/buffer',
'transDir' => dirname(getcwd()).'/trans',
'accessDir' => dirname(getcwd()).'/access',
+ 'isArchive' => TRUE,
/* ==================================================== URL configuration */
- // on central archive side: storage=archive !
+ // on central archive side: archive is the storage !
'storageUrlPath' => '/livesupportArchiveServer',
'storageXMLRPC' => 'xmlrpc/xrArchive.php',
'storageUrlHost' => 'localhost',
'storageUrlPort' => 80,
- // only for returning right URLs:
- 'archiveUrlPath' => '/livesupportArchiveServer',
- 'archiveXMLRPC' => 'xmlrpc/xrArchive.php',
- 'archiveUrlHost' => 'localhost',
- 'archiveUrlPort' => 80,
+ // have to be another remote archive:
+ #'archiveUrlPath' => '/livesupportArchiveServer',
+ #'archiveXMLRPC' => 'xmlrpc/xrArchive.php',
+ #'archiveUrlHost' => 'localhost',
+ #'archiveUrlPort' => 80,
/* ==================================== aplication-specific configuration */
'objtypes' => array(
diff --git a/livesupport/modules/archiveServer/var/install/install.php b/livesupport/modules/archiveServer/var/install/install.php
index f459a4e1c..95ab3c794 100644
--- a/livesupport/modules/archiveServer/var/install/install.php
+++ b/livesupport/modules/archiveServer/var/install/install.php
@@ -23,7 +23,7 @@
Author : $Author: tomas $
- Version : $Revision: 1.3 $
+ Version : $Revision: 1.4 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/install/install.php,v $
------------------------------------------------------------------------------*/
@@ -41,6 +41,11 @@ function errCallback($err)
exit(1);
}
+if(!function_exists('domxml_open_file')){
+ trigger_error("DOMXML PHP extension required and not found.", E_USER_ERROR);
+ exit(2);
+}
+
PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s
\n");
$dbc = DB::connect($config['dsn'], TRUE);
if(PEAR::isError($dbc)){
@@ -52,18 +57,22 @@ if(PEAR::isError($dbc)){
}
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
-$gb = &new GreenBox(&$dbc, $config);
+$gb = &new Archive(&$dbc, $config);
-echo "\n# archiveServer: Install ...\n";
+echo "# archiveServer step 2:\n# trying uninstall ...\n";
$dbc->setErrorHandling(PEAR_ERROR_RETURN);
$gb->uninstall();
-PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s
\n");
-$gb->install();
-echo "# Testing ...\n";
+echo "# Install ...\n";
+#PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s
\n");
+PEAR::setErrorHandling(PEAR_ERROR_DIE, "%s
\n");
+$r = $gb->install();
+if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
+
+echo "# Testing ...\n";
$gb->test();
$log = $gb->test_log;
-echo " TESTS:\n{$log}";
+if($log) echo "# testlog:\n{$log}";
#echo "# Reinstall + testdata insert ...\n";
#$gb->reinstall();
@@ -74,13 +83,14 @@ echo " TESTS:\n{$log}";
#echo "# TREE DUMP:\n";
#echo $gb->dumpTree();
-echo "# Delete test data ...\n";
+echo "# Delete test data ...\n";
$gb->deleteData();
-if(!($fp = @fopen($config['storageDir']."/_writeTest", 'w')))
+if(!($fp = @fopen($config['storageDir']."/_writeTest", 'w'))){
echo "\nmake {$config['storageDir']} dir webdaemon-writeable".
"\nand run install again\n\n";
-else{
+ exit(1);
+}else{
fclose($fp); unlink($config['storageDir']."/_writeTest");
echo "#archiveServer install: OK\n\n";
}
diff --git a/livesupport/modules/archiveServer/var/install/uninstall.php b/livesupport/modules/archiveServer/var/install/uninstall.php
index 9b7ebdca0..d08e063b4 100644
--- a/livesupport/modules/archiveServer/var/install/uninstall.php
+++ b/livesupport/modules/archiveServer/var/install/uninstall.php
@@ -23,7 +23,7 @@
Author : $Author: tomas $
- Version : $Revision: 1.2 $
+ Version : $Revision: 1.3 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/install/uninstall.php,v $
------------------------------------------------------------------------------*/
@@ -52,12 +52,14 @@ if(PEAR::isError($dbc)){
exit(1);
}
+echo "#ArchiveServer uninstall:\n";
$dbc->setFetchMode(DB_FETCHMODE_ASSOC);
-$gb = &new GreenBox(&$dbc, $config);
+$gb = &new Archive(&$dbc, $config);
-# $dbc->setErrorHandling(PEAR_ERROR_RETURN);
-echo "# Trying to uninstall archiveServer ...\n";
+
+$dbc->setErrorHandling(PEAR_ERROR_RETURN);
$gb->uninstall();
+echo "#ArchiveServer uninstall: OK\n";
$dbc->disconnect();
?>