X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=htetc%2Fhandler.pl;h=3c68e83ed7da4e2bd6c9d8a935ea506cb5910564;hb=3564f619654c5cbf22fc2acbe7eff0c08308e859;hp=d7c56572c35c9763a0139d12688b1a085cb2e5df;hpb=43a3bfc79a80263967e5cba41ddbc72cec9c1e97;p=freeside.git diff --git a/htetc/handler.pl b/htetc/handler.pl index d7c56572c..3c68e83ed 100644 --- a/htetc/handler.pl +++ b/htetc/handler.pl @@ -8,10 +8,19 @@ use FS::Mason qw( mason_interps ); use FS::Trace; if ( %%%RT_ENABLED%%% ) { + require RT; + $> = scalar(getpwnam('freeside')); + RT::LoadConfig(); RT::Init(); + + # disconnect DB before fork: + # (avoid 'prepared statement "dbdpg_p\d+_\d+" already exists' errors?) + $RT::Handle->dbh(undef); + undef $RT::Handle; + $> = $<; }