|
From: Santhanam <v_s...@am...> - 2003-10-31 10:24:57
|
Hi Friend,
I got the PHP with RLib working in Shell Prompt.There is a
change i did in the example script given in betabook.pdf. I added
the third parameter.
rlib_add_report($rlib, "report.xml","example");
But still i could not get the script working thru
browser.i.e generating report on the fly by accessing the PHP
script thru webserver. Please kindly help me.
Here is the updated script :
---------------------------------------------
<?
//dl ("libr-php.so");
$format = "pdf";
$sql_host = "localhost";
$sql_users = "root";
$sql_password = "";
$sql_database = "rlib";
$rlib = rlib_init();
rlib_add_datasource_mysql($rlib, "mysql", $sql_host, $sql_users,
$sql_password, $sql_database);
rlib_add_query_as($rlib, "mysql", "select * from example",
"example");
rlib_add_report($rlib, "report.xml","example");
rlib_set_output_format($rlib, $format);
rlib_execute($rlib);
header( rlib_get_content_type($rlib));
rlib_spool($rlib);
rlib_free($rlib);
?>
--------------------------------------------
Thanks in Advance.
With Regards
Santhanam
> Hi Friend,
> Here is the script :
> -----------------------------------------------------
> <?
> // dl ("libr-php.so"); // I have commented this since i have
> added libr-php.so in php.ini
> $format = "pdf";
> $sql_host = "localhost";
> $sql_users = "root";
> $sql_password = "";
> $sql_database = "rlib";
> $rlib = rlib_init();
> rlib_add_datasource_mysql($rlib, "mysql", $sql_host,
> $sql_users,
> $sql_password, $sql_database);
> rlib_add_query_as($rlib, "mysql", "select * from example",
> "example");
> rlib_add_report($rlib, "report.xml");
> rlib_set_output_format($rlib, $format);
> rlib_execute($rlib);
> header( rlib_get_content_type($rlib));
> rlib_spool($rlib);
> rlib_free($rlib);
> ?>
> ----------------------------------------------------
> With Regards
> Santhanam
>
>> Can you show a little more of the php code? Maybe the
>> entire script?
>>
>> Andrew
>>
>> -----Original Message-----
>> From: rli...@li...
>> [mailto:rli...@li...]On Behalf Of
>> Santhanam Sent: Thursday, October 30, 2003 6:25 AM
>> To: rli...@li...
>> Subject: [Rlib-users] Using RLib in PHP
>>
>>
>> Dear Friends,
>> I have succesfully tried the C examples in tests
>> directory.But
>> i could not execute the PHP Example.The error when i exgot
>> is :
>> -----------------------------------------
>> ** NUTS.. WE CRASHED
>> Quit (core dumped)
>> -----------------------------------------
>> I am using the report.xml which i have successfully used
>> in C
>> example. I am getting this error at the code :
>> rlib_add_report($rlib, "report.xml");
>>
>> Please kindly help me.
>> Thanks in Advance.
>> With Regards
>> Santhanam
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by: SF.net Giveback Program.
>> Does SourceForge.net help you be more productive? Does it
>> help you create better code? SHARE THE LOVE, and help us
>> help
>> YOU! Click Here: http://sourceforge.net/donate/
>> _______________________________________________
>> Rlib-users mailing list
>> Rli...@li...
>> https://lists.sourceforge.net/lists/listinfo/rlib-users
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by: SF.net Giveback Program.
>> Does SourceForge.net help you be more productive? Does it
>> help you create better code? SHARE THE LOVE, and help us
>> help
>> YOU! Click Here: http://sourceforge.net/donate/
>> _______________________________________________
>> Rlib-users mailing list
>> Rli...@li...
>> https://lists.sourceforge.net/lists/listinfo/rlib-users
>
>
> Best Regards
> Santhanam
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us
> help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Rlib-users mailing list
> Rli...@li...
> https://lists.sourceforge.net/lists/listinfo/rlib-users
Best Regards
Santhanam
|