This topic is locked
[SOLVED]

 Link to non PHPRunner files

2/15/2011 4:09:16 AM
PHPRunner General questions
B
btman author

Hi,

I have the following issue:

For functionallity reasons I don't want to use the PHPrunner functionality to display a graph. (too limitited for my use)

Instead I have a PHP file (run.php) that calls an XML (data.php) and displays it as a graph in a webpage.
I have created a tab by adding a PHPRunner graph and adding the URL in the visual editor. When entering my userID hardcoded in data.php the graph is displayed, but my problem now is that, because of external PHPs, the session and/or user ID is not read/known and no data is read when leaving the userid out.

My goal is for users to see only their own graps.
I'm not sure I've done the right thing in creating the tab the way I've done. What would be the best solution to create a button on the list pages linking to run.php/data.php and including the userID?
Thanks for your reply.
Ben

P
procheck 2/15/2011

Hi Ben,
You need to include your dbcommon file to your external php script (include/dbcommon.php)
Al

B
btman author 2/15/2011



Hi Ben,
You need to include your dbcommon file to your external php script (include/dbcommon.php)
Al


Hi Al,
I've inlcuded dbcommon.php in both run.php and data.php, but no such luck. No data is shown.
What I've done as well is adding in run.php to check whether the userid is picked up at all. But is doesn't.

This is the select statement I used in data.php to select the userid [color="#006400"]$strQuery = "SELECT date_format(month, '%b-%y') as month FROM evaluation AS e WHERE email = '" .$_SESSION["UserID"] . "'";. Not sure it is of any help.
Any other options?
Thanks for your help.

Ben

P
procheck 2/15/2011

I had a feeling you were going to say that. I had that problem on one of mine also.

Comment out the dbcommon line and try this instead: session_start();

B
btman author 2/15/2011

No luck there either.
Isn't the purpose of session_start() to create a session, while my goal is to keep it from the PHPRunner session? I'm not good at all at PHP and SQL, so please forgive my ignorance.

Sergey Kornilov admin 2/15/2011

The include of include/dbcommon.php file is correct way to get access to PHPRunner session variables.
If you have a valid support contract post your project to Demo Account and contact support directly sending your demo account URL.