Error handling fixed.
This commit is contained in:
parent
3c23f030a0
commit
5e776c527c
2 changed files with 12 additions and 12 deletions
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.6 $
|
Version : $Revision: 1.7 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/install/install.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/install/install.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -33,7 +33,7 @@ if(isset($arr["DOCUMENT_ROOT"]) && $arr["DOCUMENT_ROOT"] != ""){
|
||||||
header("HTTP/1.1 400");
|
header("HTTP/1.1 400");
|
||||||
header("Content-type: text/plain; charset=UTF-8");
|
header("Content-type: text/plain; charset=UTF-8");
|
||||||
echo "400 Not executable\r\n";
|
echo "400 Not executable\r\n";
|
||||||
exit;
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once '../conf.php';
|
require_once '../conf.php';
|
||||||
|
@ -46,7 +46,7 @@ function errCallback($err)
|
||||||
echo "ERROR:\n";
|
echo "ERROR:\n";
|
||||||
echo "request: "; print_r($_REQUEST);
|
echo "request: "; print_r($_REQUEST);
|
||||||
echo "gm:\n".$err->getMessage()."\ndi:\n".$err->getDebugInfo().
|
echo "gm:\n".$err->getMessage()."\ndi:\n".$err->getDebugInfo().
|
||||||
"\nui:\n".$err->getUserInfo()."\n</pre>\n";
|
"\nui:\n".$err->getUserInfo()."\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,11 +76,11 @@ echo "# Install ...\n";
|
||||||
#PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s<hr>\n");
|
#PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s<hr>\n");
|
||||||
PEAR::setErrorHandling(PEAR_ERROR_DIE, "%s<hr>\n");
|
PEAR::setErrorHandling(PEAR_ERROR_DIE, "%s<hr>\n");
|
||||||
$r = $gb->install();
|
$r = $gb->install();
|
||||||
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
|
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit(1); }
|
||||||
|
|
||||||
echo "# Testing ...\n";
|
echo "# Testing ...\n";
|
||||||
$r = $gb->test();
|
$r = $gb->test();
|
||||||
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
|
if(PEAR::isError($r)){ echo $r->getMessage()."\n"; exit(1); }
|
||||||
$log = $gb->test_log;
|
$log = $gb->test_log;
|
||||||
if($log) echo "# testlog:\n{$log}";
|
if($log) echo "# testlog:\n{$log}";
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.15 $
|
Version : $Revision: 1.16 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/install/install.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/install/install.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -33,7 +33,7 @@ if(isset($arr["DOCUMENT_ROOT"]) && $arr["DOCUMENT_ROOT"] != ""){
|
||||||
header("HTTP/1.1 400");
|
header("HTTP/1.1 400");
|
||||||
header("Content-type: text/plain; charset=UTF-8");
|
header("Content-type: text/plain; charset=UTF-8");
|
||||||
echo "400 Not executable\r\n";
|
echo "400 Not executable\r\n";
|
||||||
exit;
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once '../conf.php';
|
require_once '../conf.php';
|
||||||
|
@ -48,7 +48,7 @@ function errCallback($err)
|
||||||
echo "ERROR:\n";
|
echo "ERROR:\n";
|
||||||
echo "request: "; print_r($_REQUEST);
|
echo "request: "; print_r($_REQUEST);
|
||||||
echo "gm:\n".$err->getMessage()."\ndi:\n".$err->getDebugInfo().
|
echo "gm:\n".$err->getMessage()."\ndi:\n".$err->getDebugInfo().
|
||||||
"\nui:\n".$err->getUserInfo()."\n</pre>\n";
|
"\nui:\n".$err->getUserInfo()."\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,11 +83,11 @@ echo "# Install ...\n";
|
||||||
#PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s<hr>\n");
|
#PEAR::setErrorHandling(PEAR_ERROR_PRINT, "%s<hr>\n");
|
||||||
PEAR::setErrorHandling(PEAR_ERROR_DIE, "%s<hr>\n");
|
PEAR::setErrorHandling(PEAR_ERROR_DIE, "%s<hr>\n");
|
||||||
$r = $gb->install();
|
$r = $gb->install();
|
||||||
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
|
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit(1); }
|
||||||
|
|
||||||
echo "# Testing ...\n";
|
echo "# Testing ...\n";
|
||||||
$r = $gb->test();
|
$r = $gb->test();
|
||||||
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
|
if(PEAR::isError($r)){ echo $r->getMessage()."\n"; exit(1); }
|
||||||
$log = $gb->test_log;
|
$log = $gb->test_log;
|
||||||
if($log) echo "# testlog:\n{$log}";
|
if($log) echo "# testlog:\n{$log}";
|
||||||
|
|
||||||
|
@ -114,12 +114,12 @@ if(!($fp = @fopen($config['storageDir']."/_writeTest", 'w'))){
|
||||||
|
|
||||||
echo "# Install Transport submodule ...";
|
echo "# Install Transport submodule ...";
|
||||||
$r = $tr->install();
|
$r = $tr->install();
|
||||||
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
|
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit(1); }
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
echo "# Install Prefs submodule ...";
|
echo "# Install Prefs submodule ...";
|
||||||
$r = $pr->install();
|
$r = $pr->install();
|
||||||
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit; }
|
if(PEAR::isError($r)){ echo $r->getUserInfo()."\n"; exit(1); }
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
echo "#storageServer submodules: OK\n";
|
echo "#storageServer submodules: OK\n";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue