Below code works on my local machine PHP server but after uploading same code on live server Line1 do not create chart under 'generated' folder. Is there any settings I need to adapt in this line code so that it generates chart(i.e. demo1_index.gif)
I have folder under my domain name libchart-1.3\libchart\demo\generated\

after going deep into folder on my address bar it shows this URL:
https://filemanager.one.com/#XXXXXXX.com/XXXXXXX.com/files/libchart-1.3/libchart/demo/generated/

Lin1:   $chart->render("libchart-1.3\libchart\demo\generated\demo1_index.gif");

Line2:  echo '<img src="libchart-1.3\libchart\demo\generated\demo1_index.gif">';



Thanks,
Regards,
Ankit Baphna
Member Avatar for diafol
$chart->render("libchart-1.3/libchart/demo/generated/demo1_index.gif");

Is correct I think - no need for line two.

You need to check your paths. You don;t say whether an error is generated.

What's that link all about?

I have done no wrong in folder path. As said this code works on my local php server but not on live server. So I believe it needs some auth in order to create demo1_index.gif in folder or need to adapt this path to work on live server.

Any suggestions?

Can you tell me format of this render command to work on live server.

Regards,
Ankit Baphna

Member Avatar for diafol

Are you saving your images to your remote server or to the filemanager.one.com site?

I am saving on my filemanager i.e. server on which my website is live.

I tried to echo and find out after what point we are not able to execute command.

when pointer comes to line 3(below) my website stops processing any next step.
VerticalBarChart is function mentioned in libchart.php
as command: require_once 'view/chart/VerticalBarChart.php';

Line3: $chart = new VerticalBarChart(500, 250);
Line4: $dataSet = new XYDataSet();

I am failing to understand why on my local server this code is working and not on my live server.

Member Avatar for diafol

I don't know if you can save to filemananger without authenticating (logging in to it).

I saved where all other PHP files are stored. There only I created folder where these charts can be created and stored and retrieve.

Any suggestions?
First of all is it normal process to user render command in php code to create charts.
What could be different in setup of local php and server php settings? to me all should be same(definitely except database hostname and ip address)

Member Avatar for diafol

OK, so the filemanager is just a sort of filemanager for your files hosted by one.com?

Instead of typing Line3:.... etc - use the code button n the editor - it will format the code automatically for you:

$chart = new VerticalBarChart(500, 250);
$dataSet = new XYDataSet();

Like that.

So what's the error that you get? Without some sort of idea, we're whistling in the dark. Temporarily enable error reporting if it's turned off:

http://www.php.net/manual/en/function.error-reporting.php

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.