Erreur jpgraph.php

Bonjour,

J'ai installer le jpgraph pour afficher ma base sous forme de graphique et j'ai écrit le code correspondant mais j'ai obtenu le code suivant:

Notice: Use of undefined constant IMG_PNG - assumed 'IMG_PNG' in c:\program files\easyphp1-8\www\nouveau dossier (20)\jpgr\jpgraph.php on line 370
JpGraph Error This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)

c urgent aidez-moi SVP

5 réponses

  1. Notice: Use of undefined constant IMG_PNG - assumed 'IMG_PNG' in c:\program files\easyphp1-8\www\nouveau dossier (20)\jpgr\jpgraph-1.20.1\src\jpgraph.php on line 370
    JpGraph Error This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)
    1. la base "test1"
      -------------------------------------------------------

      --
      -- Structure de la table 'etudiant'
      --

      CREATE TABLE 'etudiant' (
      'Num' tinyint(4) NOT NULL auto_increment,
      'Name' varchar(50) NOT NULL default '',
      'Marks' tinyint(4) NOT NULL default '0',
      PRIMARY KEY ('Num')
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

      --
      -- Contenu de la table 'etudiant'
      --

      INSERT INTO 'etudiant' VALUES (1, 'Fatma', 15);
      INSERT INTO 'etudiant' VALUES (2, 'Mohamed', 20);
      --------------------------------------------------------
      graph.php
      -------------------------------------------------------
      <?php

      include("jpgraph-1.20.1/src/jpgraph.php");
      include("jpgraph-1.20.1/src/jpgraph_line.php");
      include("connection.php");
      $ydataAll=connect();
      $ydata=$ydataAll[1];
      $Names=$ydataAll[0];
      $graph=new Graph(300,200);
      $graph->SetScale("textlin",0,20);
      $lineplot=new LinePlot($ydata);
      $lineplot->SetColor("blue");
      $lineplot->SetWeight(2);
      $lineplot->SetFillColor("lightgreen");
      $lineplot->SetCenter();
      $graph->Add($lineplot);
      $graph->img->SetMargin(40,20,20,40);
      $graph->title->Set("Sections par étudiant");
      $graph->title->SetFont(FF_FONT1,FS_BOLD);
      $graph->title->SetColor("blue");
      $graph->xaxis->SetTickLabels($Names);
      $graph->xaxis->title->Set("nom des étudiants");
      $graph->xaxis->SetColor("lightblue","blue");
      $graph->yaxis->title->Set("Sections");
      $graph->yaxis->SetFont(FF_FONT1,FS_NORMAL);
      $graph->yaxis->SetColor("lightblue","blue");
      $graph->ygrid->SetColor("blue");
      $graph->SetMarginColor('#FCFEF1');
      $graph->SetColor('#FFFFCC');
      $graph->SetShadow();
      $graph->Stroke();
      ?>
      -----------------------------------------------------------
      connection.php
      ---------------------------------------------------------
      <?php
      function connect()
      {
      $db=mysql_connect("localhost","root","") or die(mysql_error());
      mysql_select_db("test1",$db) or die(mysql_error());
      $sql=mysql_query("SELECT *FROM etudiant") or die(mysql_error());
      while($row=mysql_fetch_array($sql))
      {
      $leg[]=$row[1];
      $data[]=$row[2];
      }
      $data2[0]=$leg;
      $data2[1]=$data;
      return $data2;
      }
      ?>

      --------------------------------------------------------
      present.html
      ---------------------------------------------------------
      <html>
      <head></head>
      <body>
      <div align="center">
      <img src="graph.php" border=1>
      </div>
      </body>
      </html>
      1. c quoi :
        Notice: Use of undefined constant IMG_PNG - assumed 'IMG_PNG' in c:\program files\easyphp1-8\www\nouveau dossier (20)\jpgr\jpgraph-1.20.1\src\jpgraph.php on line 370
        JpGraph Error This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)
    2. Salut, j'ai telecharger jpgraph mais je sais pas comment faire un graphique relatif à ma base de données
      SVP aidez moi... comment faire pour:
      activer le GD (extension=php_gd2.dll)
      quelle version de php , de easyphp pour afficher une graphique
      ou se trouve le fichier php.ini
      ...quelles sont les conditions pour que le graphique soit affiché surement sur une page web (html ou php).

      J'ai installer le jpgraph pour afficher ma base sous forme de graphique et j'ai écrit le code correspondant mais j'ai obtenu le code suivant:

      Notice: Use of undefined constant IMG_PNG - assumed 'IMG_PNG' in c:\program files\easyphp1-8\www\nouveau dossier (20)\jpgr\jpgraph.php on line 370
      JpGraph Error This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)

      c urgent aidez-moi SVP
      ---------------
      quels sont les problèmes pour ces choses suivantes ???????????????
      jpgraph
      jpgraph.php : comment le modifier
      GD 2 : ou le lien pour la telecharger et comment l'installer
      phpinfo();
      php.ini : comment le modifier
      php 4, 5 : comment l'installer et l'utiliser
      1. quels sont les problèmes pour ces choses suivantes ???????????????
        jpgraph
        jpgraph.php
        GD 2
        phpinfo();
        php.ini
        php 4, 5
        1. J'ai installer le jpgraph pour afficher ma base sous forme de graphique et j'ai écrit le code correspondant mais j'ai obtenu le code suivant:

          Notice: Use of undefined constant IMG_PNG - assumed 'IMG_PNG' in c:\program files\easyphp1-8\www\nouveau dossier (20)\jpgr\jpgraph.php on line 370
          JpGraph Error This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)

          c urgent aidez-moi SVP