in reply to GDGraph Installation

Paste the whole code instead of only the line causing trouble.

When you installed GD, did it correctly detect libpng? Did it tell you explicitely that PNG support was enabled?

Update (after Lhamo_rin posted the full code): this is the example code from the GD doc, it works perfectly on my system, so I guess your issue has to do with how you installed all the needed libs. As johnnywang suggested, now that libpng is installed, recompile libgd, then reinstall GD.