Jump to content

Recommended Posts

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 create
a pie chart line chart, whatever

So 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 confused

Any help would be much appreciated for this PHP rookie!

Thanks

Dan
Link to comment
https://forums.phpfreaks.com/topic/9054-php-problems/
Share on other sites

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.
Link to comment
https://forums.phpfreaks.com/topic/9054-php-problems/#findComment-33302
Share on other sites

[!--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?
Link to comment
https://forums.phpfreaks.com/topic/9054-php-problems/#findComment-33304
Share on other sites

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.
Link to comment
https://forums.phpfreaks.com/topic/9054-php-problems/#findComment-33306
Share on other sites

Great Instruction but..

is there anyway of testing the GD library is installed

I made the changes you suggested restarted apache and got 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)

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
Link to comment
https://forums.phpfreaks.com/topic/9054-php-problems/#findComment-33311
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.