Menu

Tips for Windows users

Help
2003-11-04
2003-11-06
  • Julie Bielski

    Julie Bielski - 2003-11-04

    If you're running Apache (1.3.x version) and mod_xmlrpc on Windows, there's a small change you should make to mod_xmlrpc.c.
    In the function xmlrpc_exec, near the bottom, instead of:
       child_pid=ap_call_exec(r, pinfo, program, env, 0);
       ap_log_error(APLOG_MARK, APLOG_ERR, NULL, "execution of %s failed", r->filename);
       exit(0);
       return;

    Use:
       child_pid=ap_call_exec(r, pinfo, program, env, 0);
       #if defined(WIN32) || defined(OS2)
        return (child_pid);
       #else
       ap_log_error(APLOG_MARK, APLOG_ERR, NULL, "execution of %s failed", r->filename);
       exit(0);
       return (0);
       #endif

    Otherwise, you'll blow a half a day pulling your hair out as I did.
    Also, if you're CGI program is an exe, you don't need
    the '.exe' extension.
    For example, I have a program named msglogr.exe that I renamed msglogr and copied to e:\Program Files\Apache Group\Apache\xmlrpc\work per my xmlRpcLibrary directive in httpd.conf.
    I can invoke it as http://localhost:80/RPC2 work.msglogr

     
    • Andrew Bihun

      Andrew Bihun - 2003-11-05

      Another (probably) solution (dosn't require modifications in src) is calling functions asis (with exe extention - "myfunc.exe").

      Andrew

       
    • Julie Bielski

      Julie Bielski - 2003-11-06

      Hey Andrew,

      Per your suggestion, I tried:
      http://localhost:80/RPC2 work.msglogr.exe and it DID work.
      The source code change had to do with the fact that mod_xmlrpc was always reporting 'execution failed'. I started to compare the code in xml_rpcexec with very similar code in mod_cgi, and I noticed they had the #ifdefined(WIN32) statement. Once I added the same directive to your code, everything worked. Otherwise, the code always dropped through to reporting an error.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.