From: John B. <jo...@ma...> - 2003-10-29 19:56:32
|
I have rlib working on my linux system, with the C code, but not with PHP. I tried the PHP example, and also mimicking my working C code in PHP, namely like this: <? error_reporting(E_ALL); dl ("libr.so"); $r = rlib_init(); rlib_add_datasource_mysql($r, "local_mysql", "localhost", "root", "xxxxx", "magnatune"); rlib_add_query_as($r, "local_mysql", "select * from visa;", "example"); rlib_add_report($r, "report.xml", "example"); rlib_set_output_format($r, "html"); rlib_execute($r); rlib_finalize($r); header(rlib_get_content_type($r)); rlib_spool($r); ?> the trouble is that if I run up to rlib_execute the page displays nothing, and apache's errorlog shows a few pid's exiting. I'm not sure how to debug this any further. I know the library's loading, because if I pass invalid params to, say, rlib_add_report, I get a helpful error. -- you'll not that: rlib_add_query_as($r, "local_mysql", "select * from visa;", "example"); takes 4 params, not 3 as documented. -- it would be *very* helpful to have a reports.xml included in the distribution. Copying/pasting from the PDF loses the tab indentation, but more seriously, all single quotes are turned into "smart quotes" which cause XML parser errors. -- it would be very handy to be able to give a filename to rlib_spool(r) and have the output written there. That would let me have a big C program which generated all my reports in one program, without needing to repeatedly run a C program and shell out. --- Any interest in Tcl bindings? It happens to be my language of choice (though I do use PHP and Perl a lot too). I can probably make them fairly easily. -- can you provide an XML example of report breaks ? I can probably hack at them for a few hours and make them work, but an example would be great (just paste the section into an email response) --- FYI, the C code is very clean, which is a nice suprise, and really helped me understand how this worked. -john |