Graphing with PHP using GD - error !

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

coool
Forum Commoner
Posts: 45
Joined: Wed Jul 11, 2007 5:51 pm

Post by coool »

as soon as you provide me with a simple example.. i can work my way with solving the problem !..

:)
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

check out jpgraph
coool
Forum Commoner
Posts: 45
Joined: Wed Jul 11, 2007 5:51 pm

Post by coool »

is this free ?? :roll:
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

JpGraph is released under a dual license. QPL 1.0 (Qt Free Licensee) For non-commercial, open-source or educational use and JpGraph Professional License for commercial use. The professional version also includes additional features and support.
coool
Forum Commoner
Posts: 45
Joined: Wed Jul 11, 2007 5:51 pm

Post by coool »

do you mean this is something I need to upload to my php site ?
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

coool wrote:do you mean this is something I need to upload to my php site ?
Or study it. It's your choice whether or not to use it or make your own.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

coool wrote:do you mean this is something I need to upload to my php site ?
If you post questions that demonstrate you haven't bothered to look anything up yourself I'm going to lock this thread. Reading the JPGraph site will give you plenty of information. We are not here to spoon-feed you basic things that you could find out with a couple of clicks.
coool
Forum Commoner
Posts: 45
Joined: Wed Jul 11, 2007 5:51 pm

Post by coool »

you know what Mr.onion2k

The fact is that I've READ most of the JPGraph ( just ignored the older versions pages of the tool )

I've asked the previous question because the answer wasn't clear for me when I've read in JPGraph site

strange ! how you've judged quickly - would you like people to do that with you !!!

I wasn't expecting someone from this forum to judge and talk to me in such a way

oh.. !
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

coool wrote:you know what Mr.onion2k

The fact is that I've READ most of the JPGraph ( just ignored the older versions pages of the tool )

I've asked the previous question because the answer wasn't clear for me when I've read in JPGraph site

strange ! how you've judged quickly - would you like people to do that with you !!!

I wasn't expecting someone from this forum to judge and talk to me in such a way

oh.. !
Oh, hush. :P

onion2k was implying that you did not try this out for yourself, which is obvious from your question. Here, we require that you do for yourself before we will do for you, as it is important that you put forth effort in order for you to learn PHP. What you should have done is downloaded it and did with it what you should do with every application: try it out.
coool
Forum Commoner
Posts: 45
Joined: Wed Jul 11, 2007 5:51 pm

Post by coool »

Thanks superdezign for your nice way of explaining the way things done here in this forum

and thanks for the smile... it made a difference :)


I really have read many pages in that website..

but the problem i had is when i've downloaded the file.. i couldn't UnZip it ! ... it's .tar.tar !!!!

also i've tried to download a special tar UnZipper ! .. but that doesn't work ! .. maybe the file is corrupted !
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

coool wrote:but the problem i had is when i've downloaded the file.. i couldn't UnZip it ! ... it's .tar.tar !!!!

also i've tried to download a special tar UnZipper ! .. but that doesn't work ! .. maybe the file is corrupted !
WinRAR will deal with that
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

You should get 7Zip or GZip, as they both are built to handle the *.7z and *.tar.gz formats.
coool
Forum Commoner
Posts: 45
Joined: Wed Jul 11, 2007 5:51 pm

Post by coool »

Thanks superdezign

I've UnZipped it successfully :)

and now I'm trying to install it ! ( by the way - i don't really know how to install applications to my php site !! )

for example they said:

3.5 Detailed steps to install JpGraph

If You are insatlling the 1.x branch then make sure the PHP version used is at least 4.3.x (preferable 4.3.10 or higher) and that the PHP version have compiled support for GD library. It is absolutely critical that GD is fully working. Please see the earlier sections on how to make sure. JpGraph supports both GD 1.x and GD 2.x However it is strongly recommended to use GD 2.x since that will improve performance and support true color images as well as alphablending.

If You are insatlling the 2.x branch then make sure the PHP version used is at least 5.0.1 (preferable 5.0.5 or higher) and that the PHP version have compiled support for GD 2.x library. Please note that the 2.x branch will not work with PHP 4.x

Unzip and copy the files to a directory of your choice.
Set up the directory paths in jpg-config.inc.php where the cache directory should be and where your TTF directory is.

Note that Apache/PHP must have write permission in your cache directory.
Check that all rest of the DEFINE in the top of JpGraph.php is setup to your preference. The default should be fine for most users. (See also Note 5. below) Specifically check that the settings of USE_GD2_LIBRARY reflects your installation, (should be true if you have GD2 installed, false otherwise).

Make sure PHP have write privileges to your cache directory if you plan on using the cache feature.
Some windows installations seems to have a problem with a PHP script ending in a newline (This newline seems to be sent to the browser and will cause a Header already sent error). If you have this problem try remove all trailing newlines in the jpgraph* files

_________________________________

when they said (install jpgraph) do they mean i should copy the scource code forlder of JPGraph to my site !! in the main directory i have the index.php in ??
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

coool wrote:when they said (install jpgraph) do they mean i should copy the scource code forlder of JPGraph to my site !! in the main directory i have the index.php in ??
Maybe you're not fully understand what a PHP application is. Just like anything you write in PHP, the application is just code. It's just regular PHP files that can be included, manipulated, and used. Generally, the application will handle most things on the back-end, and you'll only need to follow certain instructions from the documentation on instantiating the objects and using the functions. The application should handle the rest.

There is no real "installation," you just copy the files somewhere where they can be used (a server), and then use them like any other PHP files. If you would like to create a graphing application with the GD library yourself, you should study deeper into the code to see the methods that they use and think of methods that you could use. Or, you could take the easy road and just read their documentation, then use the application. Your choice.
coool
Forum Commoner
Posts: 45
Joined: Wed Jul 11, 2007 5:51 pm

Post by coool »

hmm.. I'll choose an easier way to do things..

read here :) please

viewtopic.php?p=404982
Post Reply