Wrapper around TEXIS

Post Reply
Faiz
Posts: 109
Joined: Wed Jan 10, 2001 1:29 pm

Wrapper around TEXIS

Post by Faiz »

Hi,
I am indexing documents like Word, PDF, etc from the web and I need to write a wrapper around it because without the wrapper it doesn't seem to find the LD_LIBRARY_PATH. But even after writing the wrapper it gave me this error,
ld.so.1: /usr/local/morph3/bin/anytotx: fatal: libpdftoolkit.so.3.0: open failed: No such file or directory
This is what I did.
I have a script similar to the dowalk script but customized so that only one page is indexed. At the beginning of the script, before <script language=vortex>, I had unset various cgi variables and set the LD_LIBRARY_PATH and also did an export. This didn't work.
However, if I create a file in UNIX with all the unset variables and the LD_LIBRARY_PATH and then have the indexing script called from within this file, then it works. But for this, I have to do an exec of the UNIX file from the vortex script after passing all the parameters and I dont want to do that. I want to directly run the indexing script from the web. How can I set the wrapper around the script? Any help?

Thanx
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Wrapper around TEXIS

Post by mark »

I assume your wrapper looks something like this:

#!/bin/sh
LD_LIBRARY_PATH=/usr/local/morph3/bin
export LD_LIBRARY_PATH
/usr/local/morph3/bin/anytotx "$@"
exit $?

Some operating systems don't allow setuid programs to access shared libs that are not in a "standard" place like /lib or /usr/lib. Make sure anytotx is not setuid or place the pdf toolkid shared libs into the standard place.

One of the enhancements in the latest version of Texis is the removal of reliance of extra shared libs for file conversions.
Faiz
Posts: 109
Joined: Wed Jan 10, 2001 1:29 pm

Wrapper around TEXIS

Post by Faiz »

Actually no. It looked like,
#!/bin/sh
unset PATH_TRANSLATED
unset SCRIPT_NAME
......
LD_LIBRARY_PATH=/usr/local/morph3/bin
export LD_LIBRARY_PATH
<script language=vortex>
......
</script>
I didnt write /usr/local/morph3/bin/anytotx "$@" and exit $? What are they for? Are they necessary? And I dont think anytotx is setuid because I am not doing it in any of my programs. The version I use is,
Texis Web Script (Vortex) Copyright (c) 1996-2001 Thunderstone - EPI, Inc.
Commercial Version 3.01.987613528 of Apr 18, 2001 (sparc-sun-solaris2.6)
Is this the latest version of TEXIS where enhancements are available?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Wrapper around TEXIS

Post by mark »

"#!/bin/sh" is a shell scripting construct as is "unset" and such. "<script language=vortex>" is a vortex scripting construct. You can not mix and match scripting languages like that.

So I'm lost as to what you are doing. You probably really need the wrapper around anytotx, not dowalk.

Your dowalk script should be calling the plugin to do the conversions. Normally you would set the extra LD_LIBRARY_PATH before starting the webserver so it knows about it and can pass it through to CGI programs. If you're having problems getting LD_LIBRARY_PATH to pass through the webserver you can write a wrapper around the anytotx plugin as in my previous example and call that instead of anytotx within your dowalk script.
Faiz
Posts: 109
Joined: Wed Jan 10, 2001 1:29 pm

Wrapper around TEXIS

Post by Faiz »

sorry about the confusion. i got a little confused too. But now when I independantly write a wrapper (as you mentioned) around anytotx and not call it from within the indexing script, it works fine. many thanx.
Post Reply