You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by di...@us.ibm.com on 2000/07/07 14:04:52 UTC

WINSOCK host not found error using ap_call_exec()




       Help. I'm lost.  I wanted to execute a command "cleartool catcs"
from within an apache module. That works well enough using a system call
except I wanted to redirect the output to a file. I found that Apache
does not allow you to say system("cleartool catcs > my.output").  So,
reading the book "writing apache modules with Perl and C" by Stein and
MacEachorn, I followed the example on page 628.

        I got this working to the point where the cleartool command is
being executed and apparently it does see the args passed to it (catcs
-tag myview).  I am using ap_bspawn_child in the parent routine and I
have the stderr and regular output going to BUFFs.  From the stderr BUFF
I am getting the following error message:
   cleartool: Error:  Unknown host 'ROSEY':  [WINSOCK] Host not found

     ROSEY is the name of my host. Both cleartool and Apache are
installed on it. Nowhere in this entire execution path am I calling or
executing on any other hosts.

       If I execute the same 'cleartool catcs -tag myview' command
simply from a command line on ROSEY, there is no problem and I get
correct output. I don't get that WINSOCK error.

        I could not find any references in any Apache books I have been
able to look at to date about any connections between WINSOCK and Apache
that I understood to have anything to do with this.

         I also didn't see any bugs listed that sounded anything like
this, nor has anybody asked any similar questions on the FAQ lists.

         I do not understand why WINSOCK is involved at all since if you
execute the same command from the command line instead of inside apache,
there doesn't seem to be any problem and I doubt if it is going to
WINSOCK at all.

          Thanks for any help,

          Suzanne Dirkers (dirkers at us.ibm.com)