Jump to content

jpgraph error


mtgriffiths

Recommended Posts

Hey all,

 

I am using jpgraph to create a bar chart using data from my database.

 

It works fine when i am running it on localhost but when i transfer it onto my webspace i recieve the following error:

 

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/29/d239295547/htdocs/DDWA4/jpgraph/src/jpgraph.php on line 278

 

As it is to do with jpgraph i am stumped as i did not write this myself.

 

The line that the error is pointing to is:

 

277  class JpgTimer {

278  private $start, $idx;

 

Has anybody encountered this error before or know how to sort it out

 

Thanks in advance

 

Matthew

Link to comment
Share on other sites

Code that runs on one server and you get parse errors when moving it to a different server are usually caused by short open tags being used in the code. You would need to post more of your code to get any help with what it causing the problem.

Link to comment
Share on other sites

I downloaded the jpgraph file and the other files needed off the internet from a website that was sent to me. The jpgraph file is over 7000 lines of code so im not too sure if its just that but thats the error that i am getting.

 

Doesnt seem like im being to much help to what the problem is but as im completly new to jpgraph only using it for the first time today i am unsure.

 

The hosting company that i am using supports both php 4 and 5. I will check to see what version of php i am using and then get back.

 

thanks again

Link to comment
Share on other sites

Edit: Or as rhodesa states, a php4 problem.

 

(Here it is again) - The end of life of php4 was announced 13-Jul-2007. The final bug fixes in php4 were released 03-Jan-2008. Php4 is a dead product. Everyone should have already made the switch to php5 or have a short term schedule in place for doing so.

 

If you have php5 available, change over to it.

Link to comment
Share on other sites

That seems to have made a change.

I am getting a jpgraph error now saying that:

 

/usr/X11R6/lib/X11/fonts/truetype/verdana.ttf is not readable or does not exist.

 

Any idea why that is? It works fine localhost and ive put the same files in my directory as on my pc

Link to comment
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.