ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  PHP include command breaking charts
Posted by Aidan on Aug-02-2017 18:58
My hosting company has recently upgraded my server to php 5.6, and after a bit of faffing around caused by no longer being able to dynamically load the chartdirector library, I've finally got it working... or nearly...

My site runs on MySQL, and the connection parameters, along with a bunch of other settings are held in a config file, which is then referenced by each php page that needs it, ie:

include('config.php');

However, this one line seems to be stopping chartidrector loading  I don't get any error, but I don't get a chart image, just a little square with an X in it.

I've set up a very simple example using one of the demo charts - here it is working fine on my server:

http://totalfantasyleague.com/candlestick.php

and here it is with the include line added at the top, but otherwise identical:

http://totalfantasyleague.com/candlestick2.php


The charts have always worked fine previously, and what's more the config include is working fine across the rest of the site, when charts are not involved - ie it is querying the database just fine and pulling back correct data, which means it must be picking up the connection parameters correctly.

I'm stuck... any ideas?

  Re: PHP include command breaking charts
Posted by Aidan on Aug-02-2017 19:39
OK, think I've stumbled across the solution by a lot of trial and error...

my config file had a few blank spaces after the final "?>" - I removed these, and it all works!

God knows why this has started being a problem, I guess php must have tightened up on blank spaces for some reason!

  Re: PHP include command breaking charts
Posted by Edson Martignago on Nov-05-2019 00:15
Hi.
I have the very same with ASP Classic.
When I use a INCLUDE to call the chart page, nothing happens - only a blank screen.
No error or messages. Only a blank screen.
Has someone ideas to solve it?

Thanks.

  Re: PHP include command breaking charts
Posted by Peter Kwan on Nov-05-2019 02:55
Hi Edson,

Would you mind to clarify whether your "chart page" is a HTML web page, or is an image?

In the sample code that comes with ChartDirector for ASP/COM/VB, most of the ASP are chart images. Like all other images, the <IMG> tag should be used to include them in a web page.

For example, consider the "Simple Bar Chart" sample code "simplebar.asp". To include it in a web page, it should be like:

<html>
<body>
Hi, this is a web page <br>
Hello World<br>
<br>
<img src="simplebar.asp">
</body>
</html>

In summary, if your "chart page" is itself an HTML web page (such as the ASP in the "Clickable Charts" sample code), you should be able to use the "include" statement to include it. If your "chart page" is a non-HTML ASP page (such as if it outputs an image), the <IMG> tag should be used.

Hope this can help.

Regards
Peter Kwan


hausfrauen porno tube