Bacula-users

Re: [Bacula-users] bacula-web and PHP5

2008-07-01 09:41:28
Subject: Re: [Bacula-users] bacula-web and PHP5
From: LDB <ldbout AT gmail DOT com>
To: John Drescher <drescherjm AT gmail DOT com>
Date: Tue, 01 Jul 2008 09:41:20 -0400
John Drescher wrote:
> On Sat, Jun 28, 2008 at 12:02 PM, John Drescher <drescherjm AT gmail DOT com> 
> wrote:
>> On Sat, Jun 28, 2008 at 11:59 AM, LDB <ldbout AT gmail DOT com> wrote:
>>> Has anyone configured bacula-web to work with PHP5?
>>>
>> I am pretty sure I have using a cvs version of bacula-gui taken over a
>> year ago. Upgrading to the current code causes me a database
>> connection problem (with postgres) that I have yet to debug. I will
>> try to check on this on Monday.
>>
> I am running php-5.2.6_rc1,apache-2.2.9 and postgresql-8.2.6 on x86_64
> gentoo 2008.0 with the cvs snapshot of bacula-web from a few weeks
> after the release of bacula-1.38.5.
> 
> John
> 

No matter what .. I still get the following on my browser, in text ...
It is like a module is not loading or something ...

compile_check = true; //$smarty->debugging = true; $smarty->template_dir 
= "./templates"; $smarty->compile_dir = "./templates_c"; 
$smarty->config_dir = "./configs"; $smarty->config_load("bacula.conf"); 
// Load config file $mode = $smarty->get_config_vars("mode"); // Lite o 
Extend? require("lang.php"); //Assign dbs if ( count($dbSql->dbs) >1 ) { 
$smarty->assign("dbs", $dbSql->dbs); $smarty->assign("dbs_now", 
$_SESSION['DATABASE']); } // generaldata.tpl & last_run_report.tpl 
(last24bytes) $client = $dbSql->link->query("select count(*) from 
Client") or die ("Error query: 1"); $totalfiles = 
$dbSql->link->query("select count(FilenameId) from Filename") or die 
("Error query: 2"); if ( $dbSql->driver == "mysql") $last24bytes = 
$dbSql->link->query("select sum(JobBytes),count(*) from Job where 
Endtime <= NOW() and UNIX_TIMESTAMP(EndTime) > 
UNIX_TIMESTAMP(NOW())-86400") or die ("Error query: 3"); if ( 
$dbSql->driver == "pgsql") $last24bytes = $dbSql->link->query("select 
sum(JobBytes),count(*) from Job where Endtime <= NOW() and EndTime > 
NOW() - 86400 * interval '1 second'") or die ("Error query: 3"); 
$bytes_stored =& $dbSql->link->getOne("select SUM(VolBytes) from Media") 
or die ("Error query: 4"); $smarty->assign('database_size', 
$dbSql->GetDbSize()); $smarty->assign('bytes_stored',$bytes_stored); 
$tmp = $client->fetchRow(); $smarty->assign('clientes_totales',$tmp[0]); 
$tmp = $last24bytes->fetchRow(); /*if ( empty($tmp[0]) ) { // No data 
for last 24, search last 48 if ( $dbSql->driver == "mysql" ) 
$last24bytes = $dbSql->link->query("select sum(JobBytes) from Job where 
Endtime <= NOW() and UNIX_TIMESTAMP(EndTime) > 
UNIX_TIMESTAMP(NOW())-172800" ); if ( $dbSql->driver == "pgsql") 
$last24bytes = $dbSql->link->query("select sum(JobBytes) from Job where 
Endtime <= NOW() and EndTime > NOW()-172800 * interval '1 second'" ) or 
die ("Error query: 4.1"); $smarty->assign('when',"yesterday"); $tmp = 
$last24bytes->fetchRow(); }*/ $smarty->assign('bytes_totales',$tmp[0]); 
$smarty->assign('total_jobs', $tmp[1]); $tmp = $totalfiles->fetchRow(); 
$smarty->assign('files_totales',$tmp[0]); $client->free(); 
$totalfiles->free(); $last24bytes->free(); // report_select.tpl & 
last_run_report.tpl $res = $dbSql->link->query("select Name from Job 
group by Name"); $a_jobs = array(); while ( $tmp = $res->fetchRow() ) 
array_push($a_jobs, $tmp[0]); 
$smarty->assign('total_name_jobs',$a_jobs); $smarty->assign('time2',( 
(time())-2678400) ); // Current time - 1 month.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users