PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Upgrade from 5 to 6 with .NET wrapping of CGI

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Upgrade from 5 to 6 with .NET wrapping of CGI

    Hi,

    I use this approace in version 5:

    Code:
    var psi = new ProcessStartInfo {FileName = (MyPath + @"\Win32_search.cgi")};
                psi.EnvironmentVariables["REQUEST_METHOD"] = "GET";
                psi.EnvironmentVariables["QUERY_STRING"] = paramStr;
                psi.RedirectStandardInput = false;
                psi.RedirectStandardOutput = true;
                psi.UseShellExecute = false;
                var proc = Process.Start(psi);
                proc.StandardOutput.ReadLine(); // skip the HTTP header line
                var zoom_results = proc.StandardOutput.ReadToEnd(); // read from stdout 
                proc.WaitForExit();
    
                var enc = proc.StandardOutput.CurrentEncoding;
                var output = enc.GetBytes(zoom_results);
    Hope this is still valid in version 6.0, but where are: Win32_search.cgi located now?

  • #2
    Yes, this shouold still work.
    There are 3 versions of the CGI. One for Windows, Linux and BSD. (and we also have seperate Mac and Sun releases).

    When you create a set of index filles, the correct CGI file is copied into the output folder. So the output folder you select is the easiest location to get the CGI file from. However in this case you should be calling search.cgi instead of Win32_search.cgi.

    If you want to see all the CGI files, then the installation folder for these files is by default,
    On Vista
    Code:
    C:\ProgramData\Wrensoft\Zoom Search Engine Indexer\scripts\CGI
    On XP
    Code:
    C:\Documents and Settings\All Users\Application Data\Wrensoft\Zoom Search Engine Indexer\scripts\CGI
    Note that for some reason we don't really understand Vista hides the ProgramData folder. But this is where Microsoft recomends files like this are stored.

    Comment


    • #3
      I use this code to activate the indexer from my aspx page:

      Code:
      var p = new Process
                                      {
                                          StartInfo =
                                              {
                                                  WorkingDirectory = MyPath,
                                                  FileName = ConfigurationManager.AppSettings["ZoomIndexer"],
                                                  Arguments = (" -s " + MyPath + "/zoom.zcfg"),
                                                  CreateNoWindow = true,
                                                  UseShellExecute = false
                                              }
                                      };
                          p.Start();
                          p.WaitForExit();
      It work fine, but I get these lines in the bottom of my zoomindexer.log file:

      Code:
      Could not copy search script from: C:\Documents and Settings\All Users\Application Data\Wrensoft\Zoom Search Engine Indexer\scripts\CGI\Win32_search.cgi [Access denied].
      
      Failed to open .ini file (C:\Documents and Settings\All Users\Application Data\Wrensoft\Zoom Search Engine Indexer\zoom.ini)
      Failed to open .ini file (C:\Documents and Settings\All Users\Application Data\Wrensoft\Zoom Search Engine Indexer\zoom.ini)
      Failed to open .ini file (C:\Documents and Settings\All Users\Application Data\Wrensoft\Zoom Search Engine Indexer\zoom.ini)
      1. I don't need the system to copy the Win32_search.cgi file to my folder - how can I stop that?
      2. I don't want anything to be written to the zoom.ini file at that location, how do I stop that - or set the system to use the WorkingDirectory path instead?

      Comment


      • #4
        I assume that the account running your ASPX script doesn't have permissions in those folders.

        In the advanced configuration panel you can specify the location of a custom script (in any folder). So this should allow you to avoid the error.

        The ini file just holds data related to the Zoom user interface, like the last configuration files used and the position of the Zoom window on the desktop. You can ignore these errors. This is the Microsoft recommended location for files like this.

        If you have the enterprise edition, then you can call Zoom in console mode, which should avoid these ini file errors.

        Comment


        • #5
          The call, as I inserted in my last thread, is a console mode call.

          You can see that I use "-s" in the Arguments,- are there other parameters that should be added to skip the opening of the zoom.ini file?

          Comment


          • #6
            Console mode uses the -c flag.
            -s is Spider mode.

            Comment


            • #7
              Hi,

              I have the proffesional version - and have never seen these messages before.

              My conclusion is that version 6 is doing things in a different way.

              My only choise, as I unterstand it, is to ignore it and leave these messages in the log.

              Comment


              • #8
                My only choise, as I unterstand it, is to ignore it and leave these messages in the log


                No. Your other choice is to change the file permissions to allow this file to be read and written.

                Comment

                Working...
                X