dawh8473 Posted May 4, 2006 Share Posted May 4, 2006 Yesterday i downloaded PHP for the first time, usually I have used ASP but awnted to give PHP a try for university.I installed apache and then PHP and the test page worked.Today i need to download graphical packages than enabled me to create graphs. I want to be able to pass information from a database and createa pie chart line chart, whateverSo when I cam accross JpGraph i was happy as it seems to do what I need. So, I downloaded the jpgraph-2.1.1.tar file. I am running a windows machine.I then placed this into the htdocs folder on the apache folder. Then i tried to run one of the examples (http://localhost/jpgraph-2.1.1/src/Examples/bargradex1.php)This is when I recieve the error: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) What exactly do I have to download / install to where to be able to use this graphical package. I have read the FAQ but am very confusedAny help would be much appreciated for this PHP rookie!ThanksDan Quote Link to comment Share on other sites More sharing options...
ober Posted May 4, 2006 Share Posted May 4, 2006 Have a look at this and let us know if you have any issues getting that working:[a href=\"http://us3.php.net/manual/en/ref.image.php\" target=\"_blank\"]http://us3.php.net/manual/en/ref.image.php[/a]Also, may I suggest another graphing package that I've found to be quite spectacular?[a href=\"http://www.advsofteng.com/\" target=\"_blank\"]http://www.advsofteng.com/[/a]If you don't register it, it just adds a small yellow line under all your graphs with a link to their site. But it is truly powerful. Quote Link to comment Share on other sites More sharing options...
dawh8473 Posted May 4, 2006 Author Share Posted May 4, 2006 [!--quoteo(post=371253:date=May 4 2006, 08:49 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 4 2006, 08:49 AM) [snapback]371253[/snapback][/div][div class=\'quotemain\'][!--quotec--]Have a look at this and let us know if you have any issues getting that working:[a href=\"http://us3.php.net/manual/en/ref.image.php\" target=\"_blank\"]http://us3.php.net/manual/en/ref.image.php[/a]Also, may I suggest another graphing package that I've found to be quite spectacular?[a href=\"http://www.advsofteng.com/\" target=\"_blank\"]http://www.advsofteng.com/[/a]If you don't register it, it just adds a small yellow line under all your graphs with a link to their site. But it is truly powerful.[/quote]I had actually seen page and downloaded GD. Extracted it to a file C:/GD on my windows box, then it asks to extract a batch file which i didnt get. Not sure what to do now??, thanks for the second link will check it out when i have the first bit working. I guess that is essential? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted May 4, 2006 Share Posted May 4, 2006 GD is complied on windows by defualt. To get GD working you need to enable the gd extension, You can do this by opening up the php.ini file and finf the line that says [b]extension_dir = "./"[/b]Now change where it says ./ to the full path where your PHP extension folder is located to. For instance if you install PHP in C:\php then the path will C:\php\ext[b]NOTE:[/b] PHP5.x extension folder is called [b]ext[/b]. However PHP4.x extension folder is called [b]extensions[/b]Now once you have setup the extension_dir line you need to scroll a little further to find the line that says [b];extension=php_gd2.dll[/b]. Remove the semi-colon (;) from the start of that line.Now save your php.ini and restart Apache. GD should now be available and thus your graphics package should now be able to use the imagetypes function. Quote Link to comment Share on other sites More sharing options...
dawh8473 Posted May 4, 2006 Author Share Posted May 4, 2006 Great Instruction but..is there anyway of testing the GD library is installedI made the changes you suggested restarted apache and got the errorJpGraph 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)when running[a href=\"http://localhost/jpgraph-2.1.1/src/Examples/accbarex1.php\" target=\"_blank\"]http://localhost/jpgraph-2.1.1/src/Examples/accbarex1.php[/a](I made the changes to the php.ini file within c:\windows)Thanks Dan Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.