Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi for PHP/Library/PHP    [ Add a report in this area ]  
Report #:  77379   Status: Reported
Libchart problem
Project:  HTML5 Builder Build #:  2.1.0.1098
Version:    2.0 Submitted By:   Christian Gnoth
Report Type:  Basic functionality failure Date Reported:  9/5/2009 3:53:32 AM
Severity:    Commonly encountered problem Last Updated: 9/9/2009 11:14:33 PM
Platform:    All versions Internal Tracking #:  
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
Hello,
I am using a libchart inside my page.

The data for the libchart is filled from a mysql database.

The application works fine if i put all control and objects on one page.

If I for example put the database objects (db, table, datasource) on a datamodule and include the datamodule with require_once, the libchart is not generated.

the if I have a second form with other control components and this form is incuded with require_once.

Steps to Reproduce:
1. fill out the configure.php with mysql connect data
2. create a database in mysql
3. run the .sql file against that database
4. give authority to a user (configure.php)
5. run the application in IDE
should work....

7. add a datamodule to the project
8. put the db components on a datamodule form
9. add a require_once to the businesschart.php

should run but the chart is not generated


same if the second page is put on a seperated form
Workarounds
None
Attachment
businesschart.zip
Comments

Tomohiro Takahashi at 9/6/2009 5:40:36 PM -
$DbHost, $DbUser, $DbPass, and $DbName are global variable?
If so, please try to add 'global' in 'configure.php' and 'businesschart.php'.

[configure.php]
------
$DbHost = 'localhost';
// MySQL database username
$DbUser = '';
// MySQL database password
$DbPass = '';
// MySQL database name
$DbName = 'usr_web1503_4';
------
[businesschart.php]
------
$BusinessChart->db_ChartData->DatabaseName = $DbName;
$BusinessChart->db_ChartData->Host = $DbHost;
$BusinessChart->db_ChartData->UserName = $DbUser;
$BusinessChart->db_ChartData->UserPassword = $DbPass;
------

Christian Gnoth at 9/8/2009 8:48:15 AM -
Hello,
that is not the problem. As you can see in the example it is working.

The problem is with the load_resource_from_file method. if a second form is loaded somethings goes wrong.

with regards
christian

Server Response from: ETNACODE01