From: Everton L. B. <ev...@fa...> - 2004-01-08 12:17:27
|
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 ? Bob Doan escreveu: > Hey, > > how are you calling rlib_add_report > > thats seems to be what is causing the crash.. because we are estrduping > a null pointer.. this should not be possible if PHP is behaving right > because we have this > > if(mainloop_count > 0) > rlib_add_report(rip->r, estrdup(name), estrdup(mainloop)); > else > rlib_add_report(rip->r, estrdup(name), NULL); > > > > > -- Everton Luis Berz Nucleo de Sistemas :: FACCAT - Faculdades de Taquara +55 51 541 6600 - R.624 ICQ 7807919 |