View Issue Details

IDProjectCategoryView StatusLast Update
0000047Bacula-Webbug-phppublic2013-11-19 15:05
Reportersmart-ebusinessAssigned Todavide 
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Platformphp5, apache2, bacula-web 5.2.2OSdebian 6OS Version6
Product Version 
Target VersionFixed in Version5.2.11 
Summary0000047: index.php is blank (Fatal error: DrawGraph(): No data array in /opt/baculaweb/core/external/phplot/phplot.php on line 1701)
DescriptionHi,

I have had installed the bacula-web tool on my server. I take a blank page index.php but with the debug flag inside the code I see the error

Fatal error: DrawGraph(): No data array in /opt/baculaweb/core/external/phplot/phplot.php on line 1701

test.php will produce the same error and reporting it to error.log of apache.

What happens?
TagsNo tags attached.

Activities

davide

2011-12-28 13:26

manager   ~0000080

Hello,

even test page doesn't work ?!? That's really strange

Can you ensure that PHP GD support have been installed.

Can you provide me full Apache error logs ?

Regards

jaigupta

2012-06-30 11:39

reporter   ~0000112

I have exactly same issue.

Test page shows everything is OK except PostgreSQL support.

mvdworp

2012-08-14 14:27

reporter   ~0000145

Got the same problem. If you remove the line it works. However the system probably doesn't work operational any longer.

davide

2012-08-28 16:33

manager   ~0000149

Hi,

I just made a test on a fresh bacula version 5.0.0 with MySQL backend and I didn't have any problems.

Did you try with latest version ?

Regards

sebadamus

2012-09-28 07:20

reporter   ~0000155

Last edited: 2012-09-28 07:28

View 3 revisions

Almost same here, but test.php shows fine, index.php gives blank page too.

Ubuntu 11.10 lts (uptodate), bacula-web 5.2.10

apache error.log
root@SRVBackup:/var/log/apache2# tail error.log
[Fri Sep 28 02:01:48 2012] [notice] Apache/2.2.20 (Ubuntu) PHP/5.3.6-13ubuntu3.9 with Suhosin-Patch configured -- resuming normal operations
[Fri Sep 28 02:02:07 2012] [error] [client 10.0.1.212] PHP Warning: Invalid argument supplied for foreach() in /var/www/bacula-web/core/external/phplot/phplot.php on line 5100
[Fri Sep 28 02:02:07 2012] [error] [client 10.0.1.212] PHP Fatal error: DrawGraph(): No data array in /var/www/bacula-web/core/external/phplot/phplot.php on line 1794
[Fri Sep 28 02:02:07 2012] [error] [client 10.0.1.212] File does not exist: /var/www/favicon.ico

Line 5100 (the "foreach" line)
        foreach ($this->legend as $line) {
            list($width, $unused) = $this->SizeText($font, 0, $line);
            if ($width > $max_width) $max_width = $width;
        }

Test page works perfectly (shows the graph too)

php5-gd installed and running (I think)
root@SRVBackup:/var/log/apache2# php5 -i | grep -i --color gd
Additional .ini files parsed => /etc/php5/cli/conf.d/gd.ini,
gd
GD Support => enabled
GD Version => 2.0
gd.jpeg_ignore_warning => 0 => 0

Grizly

2012-10-19 07:26

reporter   ~0000160

I had the same issue, just commented out the faulty lines, and away she went!

In this case, the whole function (determine width of font? why?, I just set it to 20 and commented out the foreach loop).


1794: //trigger_error($error_message, E_USER_ERROR);

        // Find maximum legend label line width.
        $max_width = 20; //circumvent a weird error
5100: //foreach ($this->legend as $line) {
        // list($width, $unused) = $this->SizeText($font, 0, $line);
        // if ($width > $max_width) $max_width = $width;
        //}

davide

2012-10-19 10:46

manager   ~0000161

Hi all,

PHPlot code is fine, the problem come from the way that I "build" the graph in Bacula-Web.

I'm currently working on the code to prevent that kind of problem and a fix will be inclued in the next version.

Thanks all of you for your help.

Regards

davide

2012-12-13 18:52

manager   ~0000170

Last edited: 2013-01-02 14:16

View 2 revisions

This bug has been fixed and will be available in the next version (which will be available hopefully by end of this week)

================

Did you have a chance to try the latest version ?
Do you still have the same problem ?

Thanks for your feedback

Davide

davide

2013-01-25 13:51

manager   ~0000215

Bug fixed in Bacula-Web 5.2.11

davide

2013-11-19 15:05

manager   ~0000318

Issue closed

Issue History

Date Modified Username Field Change
2011-12-28 00:07 smart-ebusiness New Issue
2011-12-28 13:25 davide Assigned To => davide
2011-12-28 13:25 davide Status new => acknowledged
2011-12-28 13:26 davide Note Added: 0000080
2011-12-28 13:26 davide Status acknowledged => feedback
2012-06-30 11:39 jaigupta Note Added: 0000112
2012-08-14 14:27 mvdworp Note Added: 0000145
2012-08-28 16:33 davide Note Added: 0000149
2012-09-28 07:20 sebadamus Note Added: 0000155
2012-09-28 07:27 sebadamus Note Edited: 0000155 View Revisions
2012-09-28 07:28 sebadamus Note Edited: 0000155 View Revisions
2012-10-19 07:26 Grizly Note Added: 0000160
2012-10-19 10:46 davide Note Added: 0000161
2012-12-13 18:52 davide Note Added: 0000170
2013-01-02 14:16 davide Note Edited: 0000170 View Revisions
2013-01-25 13:51 davide Note Added: 0000215
2013-01-25 13:51 davide Status feedback => resolved
2013-01-25 13:51 davide Fixed in Version => 5.2.11
2013-01-25 13:51 davide Resolution open => fixed
2013-11-19 15:05 davide Status resolved => closed
2013-11-19 15:05 davide Note Added: 0000318