Ir al contenido principal.
Enlaces relacionados:  Press Room  Company  Clients  Contact us
Solsoft

Forum

Re: php-OpenISIS under Sun OS


Author Message
Written on: 09. 10. 2003 [17:57]
jmlongo@uncu.edu.ar
Martín Longo
registered since: 31.12.1969
Posts: 0
¡Hola!

I had the very same problem that Ximenes did...

the problem, it seemed... was with the line:

$result = isis_search("$",$dbid);

...cause the lines:

if (!$dbid) {
echo "Can't Open the database";
}

never gave me the "Can't Open..." message

Well... I tested, like Braulio said, with the openisis executable and it
turned out that something was worng with my inverted file... I fixed it, so
I could search the database from the command line.
The problem remained though... trying to search the same database from my
php script...

Then... what I did was call the open_isis() function without any arguments:

$dbid = isis_open();
if (!$dbid) {
echo "Can't Open the database";
}
$result = isis_search("$",$dbid);

while ($record = isis_fetch_array($result)){
echo "<pre>";
var_dump($record);
echo "<pre><br/>";
}
isis_close($dbid);

... relaying in the settings I wrote on my php.ini file:

[Isis]
isis.default_dir = /home/base
isis.default_database = cds


and... voila!.... I've got a nice "database's guts exposed" page ....

now.. with this I know it works... but I still don't know why can't we set
the database manually.... any tips on this?


One more thin.. I tried isis_fetch_flat_array() function... but got a Fatal
Error saying that it's not defined.... could it be? :-S

Hasta pronto y Gracias!!

Juan Martín Longo
Encargado de Informática
SID - UNCuyo
http://sid.uncu.edu.ar




> Anyway, to be sure where is the problem try to run your queries with the
> openisis executable. I can't remember exactly what was the syntax, but
> openisis --help could give you a hint.



>
> Regards,
>
> B.
>
> ----- Original Message -----
> From: "Jose Ximenes De Mesquita - IBAMA" <Jose.Ximenes@ibama.gov.br>
> To: "PHP-OpenIsis" <php@OpenIsis.org>
> Sent: Tuesday, September 23, 2003 3:26 PM
> Subject: Re: php-OpenISIS under Sun OS
>
>
> > Hi!
> >
> > thanks for your help.
> >
> > I have tried all your suggested:
> >
> > 1 - Although, I could not get what kind of information one should put in
> $args,
> > I used the contents of that function put by Mr. Braulio in the 7th
slides
> of
> > his presentation to the Trinidad meeting ('-encoding Cp850'). (Could
> anyone,
> > please tell me what information should be placed in this variable?):
> >
> > $dbname = '/home/jximenes/www/isis-db/video/video';
> > $args = "-encoding Cp850";
> > $dbid = isis_open($dbname, $args);
> >
> > The same error message was returned. Or the error message did not
change.
> >
> > 2- I included the peace of code suggested by Roger Peña Escobio
> > (roger@infomed.sld.cu):
> >
> > $dbname = '/home/jximenes/www/isis-db/video/video';
> > $dbid = isis_open($dbname, $args);
> > if (!$dbid) { echo "Can't Open the database"; }
> >
> > The same error message was returned.
> >
> > I concluded that the problem was not in the function that opens the
> database,
> > but in the peace of code that returns the result of the search:
> >
> > $result = isis_search("amazonas",$dbid);
> >
> >
> > And I dont know what to try now.
> >
> > I must say that the code (without $arg):
> >
> > $dbid = isis_open("/home/jximenes/www/isis-db/cds/cds");
> > $result = isis_search("$",$dbid);
> > while ($record = isis_fetch_array($result))
> > {
> > echo "<pre>" ;
> > var_dump($record);
> > echo "<pre><br/>";
> > }
> > isis_close($dbid);
> >
> > worked nicely in the Windows XP environment. And so did all (or almost)
> the
> > other examples from the Mr. Braulio presentation.
> >
> > Is there any special information that should be taken care of in order
to
> > compile the source code in the Unix SUN OS environment? Should I have
> taken any
> > care for the compilation process?
> >
> > Well I would appreciate any information, or any idea to solve this
> problem.
> >
> > Muchas gracias,
> >
> > Ximenes
> >
> > Citando Braulio José Solano Rojas <braulio@solsoft.co.cr>:
> >
> > > Hi!
> > >
> > > > it looks to me that it is a problem in the way you call open_isis
> function
> > > Yes, try to add arguments. I am sorry that this is not documented,
but
> this
> > > is OpenIsis functionality, not from the extension.
> > >
> > > > maybe you should use ' insted of " insight isis_open arguments,
> > > > or none, just the complete name and path to the isisdb
> > > The difference between " and ', is that with " escape characters, like
> when
> > > you add new-line "\n", are parsed. With ' those characters are not
> parsed.
> > >
> > > Best regards,
> > >
> > > B.
> > >
> > > Mensaje citado por Jose Ximenes De Mesquita - IBAMA
> > > <Jose.Ximenes@ibama.gov.br>:
> > >
> > > > Mr. Barulio,
> > > >
> > > > I am ataching the codes I used to test under the sun OS environment.
> > > >
> > > > Thanks for your help.
> > > >
> > > > Jose Ximenes
> > > >
> > > > ----- Mensagem encaminhada de Braulio José Solano Rojas
> > > > <braulio@solsoft.co.cr> -----
> > > > Data: Mon, 22 Sep 2003 16:25:35 -0600
> > > > De: Braulio José Solano Rojas <braulio@solsoft.co.cr>
> > > > Reponder para: Braulio José Solano Rojas <braulio@solsoft.co.cr>
> > > > Assunto: Re: php-OpenISIS
> > > > Para: Jose Ximenes De Mesquita - IBAMA
<Jose.Ximenes@ibama.gov.br>
> > > >
> > > > Hello.
> > > >
> > > > > the "isis_mfn_data_seek" function (which returned that the
function
> is
> > > not
> > > > > defined (the windows version I dowloaded from your hame page is
date
> d
> > > > > 11/08/03), all other functions worked out nicely.
> > > >
> > > > Yes this is an error in the code, I'll fix it.
> > > >
> > > > > To test the same examples in my institutional environment, I
> exported
> > > the
> > > > > database CDS I used in the Windows environment using the format
> iso2709,
> > > > > uploaded it into the database (in the Sun OS environment) and
> inverted
> > > it.
> > > > I
> > > > > teste the examples using the lines of code:
> > > > >
> > > > > "
> > > > > $result = isis_search("$",$dbid);
> > > > >
> > > > > or
> > > > >
> > > > > $result = isis_query("agriculture",$dbid);
> > > > > "
> > > > >
> > > > > It was expected to receive variable of the type "resource" as the
> return
> > > > to
> > > > > this fucntions, however it returned a boolean. See the message:
> > > > >
> > > > > Warning: isis_fetch_flat_array() expects parameter 1 to be
resource,
> > > > boolean
> > > > > given in /home/jximenes/www/php-openisis/isis_query.php on line 17
> > > > >
> > > > >
> > > > > I am sure that neither the database is empty nor is the inverted
> file.
> > > > >
> > > > > Otherwise I have also tried to use those php-openisis functions to
> > > access
> > > > ours
> > > > > databases already working in the same machine which are accessed
> using
> > > > Wxis (by
> > > > > BIREME). And the result is the same. The variable $result comes as
> an
> > > > boolean
> > > > > instead of a resource.
> > > > >
> > > > > Why?
> > > >
> > > > I do not know. Could you please show your code? Maybe that way
I'll
> know
> > > > better how to help you.
> > > >
> > > > Also, please write your questions to php@openisis.org. I am
listening
> > > > there, but there is more people. In fact, maybe someone had your
> problem
> > > > and solved it.
> > > >
> > > > Regards,
> > > >
> > > > B.
> > > >
> > > >
> > > > ----- Finalizar mensagem encaminhada -----
> > > >
> > > >
> > > >
> > > >
> > > > -------------------------------------------------
> > > > IBAMA - Instituto Brasileiro do Meio Ambiente e
> > > > dos Recursos Naturais Renováveis
> > > > http://www.ibama.gov.br
> > > >
> > >
> > >
> > > ----------------------------------------------------------------------
> > > Nodo central de la red Infomed (http://www.sld.cu)
> > > Usuario linux: 97152 (http://counter.li.org)
> > > Miembro del grupo de coordinacion de LinuxCuba (http://www.linux.cu)
> > > ----------------------------------------------------------------------
> > >
> > >
> > > -------------------------------------------------
> > > Este mensaje fue enviado usando el servicio de correo en web de
Infomed
> > > http://webmail.sld.cu
> > >
> > >
> > >
> >
> >
> >
> >
> > -------------------------------------------------
> > IBAMA - Instituto Brasileiro do Meio Ambiente e
> > dos Recursos Naturais Renováveis
> > http://www.ibama.gov.br
> >
> >
>

------------------------------------------
Posted to Phorum via PhorumMail



Forgot your password?

Please enter your username or email address. Instructions for resetting the password will be immediately emailed to you.
Reset Password

Return to login form 


Copyright © 2003-2009, Solsoft de Costa Rica S.A.
Declaración de privacidad