Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/07/2012, 00:21
Montes28
 
Fecha de Ingreso: septiembre-2010
Mensajes: 1.853
Antigüedad: 13 años, 7 meses
Puntos: 6
inconvenientes para crear imagen con jpgraph y postgresql

Hola amigos espero me puedan ayudar, me encuentro generando una grafica con jpgraph y postgresql pero me sale el siguiente error


Chosen locale file ("lang/en.inc.php") for error messages does not exist or is not readable for the PHP process. Please make sure that the file exists and that the file permissions are such that the PHP process is allowed to read this file.


este es mi codigo


Código PHP:
Ver original
  1. <?php // content="text/plain; charset=utf-8"
  2. require_once('jpgraph/jpgraph.php');
  3. require_once('jpgraph/jpgraph_bar.php');
  4.  
  5. //$datay1=array(13,8,19,7,17,6);
  6. //$datay2=array(4,5,2,7,5,25);
  7.  
  8.  
  9.         $servidor = 'localhost';
  10.         $bd = 'indumontes';
  11.         $usuario = 'postgres';
  12.         $contrasenia = 'hoe798cs';
  13.         $tabla = 'factura';
  14.        
  15.  
  16.         global $servidor, $bd, $usuario, $contrasenia;
  17.         $db = new PDO('pgsql:host=' . $servidor . ';dbname=' . $bd, $usuario, $contrasenia);
  18.  
  19.         $consulta = $db->prepare("SELECT vendedor,total FROM $tabla");
  20.         $consulta->execute();
  21.  
  22.         while($fila = $consulta->fetch(PDO::FETCH_ASSOC))
  23.         {
  24.         $datay1[] = $fila[0];
  25.         $datay2[] = $fila[1];
  26.         }
  27.  
  28.  
  29.  
  30.  
  31. // Create the graph.
  32. $graph = new Graph(550,300);
  33. $graph->SetScale('textlin');
  34. $graph->SetMarginColor('white');
  35.  
  36. // Setup title
  37. $graph->title->Set('Acc bar with gradient');
  38.  
  39. // Create the first bar
  40. $bplot = new BarPlot($datay1);
  41. $bplot->SetFillGradient('AntiqueWhite2','AntiqueWhite4:0.8',GRAD_VERT);
  42. $bplot->SetColor('darkred');
  43.  
  44. // Create the second bar
  45. $bplot2 = new BarPlot($datay2);
  46. $bplot2->SetFillGradient('olivedrab1','olivedrab4',GRAD_VERT);
  47. $bplot2->SetColor('darkgreen');
  48.  
  49. // And join them in an accumulated bar
  50. $accbplot = new AccBarPlot(array($bplot,$bplot2));
  51. $graph->Add($accbplot);
  52.  
  53. $graph->Stroke();
  54.  
  55.  
  56.  
  57. ?>


que estoy haciendo mal?