Hi!
Thursday, March 01, 2001, 12:17:38 AM, you wrote:
a> <?
a> // lets search for the word "mp3"
a> $q = "mp3";
a> if ($udmconn = udm_alloc_agent("mysql://root@localhost/w3audio/","crc-multi")) {
a> udm_set_agent_param($udmconn, UDM_PARAM_PAGE_SIZE, 10);
a> $result = udm_find($udmconn,$q);
a> echo udm_get_res_param($result,UDM_PARAM_SEARCHTIME)." sek searchtime\n";
a> echo udm_get_res_param($result,UDM_PARAM_FOUND)." results.\n\n";
a> // give me 4 results
a> $bgn = 0; $end = 3;
a> while ($bgn <= $end) {
a> echo $bgn." - ";
a> echo udm_get_res_field($result,$bgn,UDM_FIELD_TITLE)."\n";
a> echo " ".udm_get_res_field($result,$bgn,UDM_FIELD_URL)."\n\n";
a> }
a> udm_free_res($result);
a> udm_free_agent($udmconn);
a> }
?>>
a> then run it on the commandline:
a> # ./php test.php
a> 0.01 sek searchtime
a> 1407 results.
I see no output from echo $bgn." - "; string here.
a> Segmentation fault
a> *boof*
a> now lets go to gdb:
a> # gdb ./php
a> (gdb) run -q test.php
a> Starting program: ./php -q test.php
a> 0.01 sek searchtime
a> 1407 results.
a> Program received signal SIGSEGV, Segmentation fault.
a> 0x8066c57 in php_if_udm_get_res_field (ht=3, return_value=0x818ac7c, this_ptr=0x0,
return_value_used=1) at php_mnogo.c:845
a> 845 RETURN_STRING((Res->Doc[row].text),1);
Very strange. It seems that you debugging not a valid core.
Look here: RETURN_STRING((Res->Doc[row].text),1);
but in your php script you are printing TITLE, not TEXT.
a> Hopefully this is a small bug and can be fixed soon. Hopefully i could
a> help to find it....
I hope too 8)
a> Please, if you know what is causing the segmentation fault, let me
a> know.
Currently i have no ideas.
Please do a print $result before call to udm_get_res_field to
see if this is a valid result identifier.
--
Regards, Sergey aka gluke.
___________________________________________
If you want to unsubscribe send "unsubscribe general"
to [EMAIL PROTECTED]