|
From: Bob D. <bd...@si...> - 2004-01-08 14:36:11
|
Hi,
In bindings/php/php.c
You will see ZEND_FUNCTION(rlib_add_report)
Can you add the rlogit line.. run your report.. crash.. but then look @
the apache log (or command line depending on how you did it)..
and tell me what it says.. this looks like a PHP problem I think
- Bob
ZEND_FUNCTION(rlib_add_report) {
zval *z_rip = NULL;
int whatever, mainloop_count;
char *name, *mainloop;
rlib_inout_pass *rip;
int id = -1;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|s", &z_rip,
&name, &whatever, &mainloop, &mainloop_count) == FAILURE) {
return;
}
rlogit("WTF.. NAME LENGTH = %d, MAINLOOP COUNT = %d\n", whatever,
mainloop_count);
ZEND_FETCH_RESOURCE(rip, rlib_inout_pass *, &z_rip, id, LE_RLIB_NAME,
le_link);
if(mainloop_count > 0)
rlib_add_report(rip->r, estrdup(name), estrdup(mainloop));
else
rlib_add_report(rip->r, estrdup(name), NULL);
}
On Thu, 2004-01-08 at 07:17, Everton Luis Berz wrote:
> hi,
>
> follow the php source code..
> <?
> dl ("librlib.so");
>
> $sql = "select c.id_company, c.name AS company_name, j.id_people,
> p.name AS people_name, j.salary, to_char(j.salary, 'R$ 99999D99') AS
> salary_br from job j
> inner join company c on (c.id_company = j.id_company)
> inner join people p on (p.id_people = j.id_people) ";
>
> $rlib = rlib_init();
> rlib_add_datasource_postgre($rlib, "pgsql", "host=localhost
> dbname=rlib_examples_latin user=postgres");
> rlib_add_query_as($rlib, "pgsql", $sql, "jobs");
> rlib_add_report($rlib, "jobs.xml");
> rlib_set_output_format_from_text($rlib, $format);
> rlib_execute($rlib);
> header( rlib_get_content_type($rlib));
> rlib_spool($rlib);
> rlib_free($rlib);
> ?>
>
> This code works perfect at my Red Hat 9 box.
> I think that php 4.3.4 causes the error, it's a unique
> difference between my computers (and linux distro..).
> Somebody tested rlib on php 4.3.4 ?
>
>
|