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

Message ListMessage List     Post MessagePost Message

  Location of getchart.php
Posted by Vincent Chang on Aug-07-2018 03:18
Hi,

How are you doing? I created a new directory on my linux system for a different chart. One thing I noticed is that even I provided the full path to the getchart.php in original directory, I still ran into problem to display the new chart, once I copied getchart.php to the new directory I created then things work normal as expected. What is the reason regarding getchar.php location?

Thanks

Vincent

  Re: Location of getchart.php
Posted by Peter Kwan on Aug-07-2018 23:10
Hi Vincent,

The "getchart.php" can be in any directory you like, as long as that directory is in the same "PHP session". Usually, all directories in the same PHP server is in the same "PHP session".

In the same "PHP session" means if one browser accesses two different directories, the server will consider the two accesses to be in the same PHP "session". In this way, the getchart.php can obtain the chart image created by a script in a different directory because they are in the same PHP session.

I have just tested using the original ChartDirector sample code. If I copied the entire ChartDirector directory to the web document root, I can access the "Simple Zooming and Scrolling" sample code using "http://xxx.xxx.xxx/ChartDrirector/phpdemo/simplezoomscroll.php". If I now copied the "getchart.php" to the web document root, and change the "getchart.php" to "/getchart.php", the script will continue to work.

If this is not working in your case, please kindly check the followings:

(a) Please verify if the absolute URL you are using is correct. Note that the path to "getchart.php" needs to be a URL path. The URL path may not be the same as the file system path, because the web server may perform directory mapping.

(b) Are you using some "PHP frameworks" that can treat different directories as different "PHP session"? Some frameworks are designed to allow a single PHP server to run multiple independent PHP applications. To avoid those PHP applications from interfering with each others, the user may use different PHP sessions for different directories. That ensures the variables in one PHP application cannot be accessed or overwritten by another PHP application.

If you need further help, if your web site is accessible from the internet, is it possible to provide me with the URL of a charting page, so I can go in to have a look? (You may email the URL to me at pkwan@advsofteng.net.)

Regards
Peter Kwan

  Re: Location of getchart.php
Posted by Vincent Chang on Aug-08-2018 03:00
Hi Peter,

Thank you for the input. After I read your comments I realized that I treated URL path as file system path so it didn't work.

Thanks

Vincent