GD library for WAMP 1.6.6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • prosad
    New Member
    • Jul 2007
    • 27

    GD library for WAMP 1.6.6

    hi,
    am haing problem creating a JPgraph with my php.
    PHP version: 5.2.0
    WAMP version: 1.6.6

    error message in browser:

    Fatal error: Call to undefined method Graph::AdjBackg roundImage() in C:\wamp\www\gra ph.php on line 23
    php code:

    [PHP]$graph->AdjBackgroundI mage(0.4,0.7,-1); //setting BG type[/PHP]

    hoping someone will give me a conclusion here.
  • Purple
    Recognized Expert Contributor
    • May 2007
    • 404

    #2
    Hi Prosad,

    the error is telling you the method you are calling does not exist,

    can you confirm

    AdjBackgroundIm age is correctly spelt in:

    [PHP]$graph->AdjBackgroundI mage(0.4,0.7,-1); [/PHP]

    Regards Purple

    Comment

    • prosad
      New Member
      • Jul 2007
      • 27

      #3
      Originally posted by Purple
      Hi Prosad,

      the error is telling you the method you are calling does not exist,

      can you confirm

      AdjBackgroundIm age is correctly spelt in:

      [PHP]$graph->AdjBackgroundI mage(0.4,0.7,-1); [/PHP]

      Regards Purple
      purple,
      as far as i can tell spelling correct,
      still searching for solution.

      Comment

      • pbmods
        Recognized Expert Expert
        • Apr 2007
        • 5821

        #4
        Heya, prosad.

        What do you get when you:
        [code=php]
        var_dump(get_cl ass($graph));
        var_dump(gettyp e($graph));
        [/code]

        Comment

        • prosad
          New Member
          • Jul 2007
          • 27

          #5
          Originally posted by pbmods
          Heya, prosad.

          What do you get when you:
          [code=php]
          var_dump(get_cl ass($graph));
          var_dump(gettyp e($graph));
          [/code]

          hi pbmods,
          i get from your var_dump:

          bool(false) string(4) "NULL"

          looking forward to you nailing this problem for me.

          Comment

          • ronnil
            Recognized Expert New Member
            • Jun 2007
            • 134

            #6
            Have you instantiated $graph? since you get "false" when using get_class($grap h), this means $graph is not an object at all.

            Comment

            • prosad
              New Member
              • Jul 2007
              • 27

              #7
              Originally posted by ronnil
              Have you instantiated $graph? since you get "false" when using get_class($grap h), this means $graph is not an object at all.
              ronnil,
              believe $graph is instantiated since only that particular line (4) gives error.
              if i comment out that particular line the program runs to the end ok.
              code below, gotten from a tutorial pn using JPgraph

              [PHP]$graph = new Graph(250,150," auto");
              $graph->SetScale("text int");
              $graph->img->SetMargin(50,3 0,50,50);
              $graph->AdjBackgroundI mage(0.4,0.7,-1);
              $graph->SetBackgroundI mage("linux_pez .png",BGIMG_FIL LFRAME); //adding image
              $graph->SetShadow();[/PHP]

              Comment

              Working...