PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Configuring CGI & Linux

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

  • Configuring CGI & Linux

    I am having some issues with cgi on my linux server. I have other cgi files in the cgi-bin script alias directory tht work properly. I have configured all the setting according to the faq.

    [1] I uploaded all the files as binary
    [2] Gave the zdat files public read
    [3] Gve the cgi 755 permissions
    [4] Looked at the httpd.conf file and all the cgi handling is in order (after all it works for other cgi's anyway)


    However I am consistently getting premature header errors. The zdat files are over 2 megs could it be a memory and cpu issue? If so what config do you recommend for the server?

  • #2
    Are you calling search.cgi directly or have you embedded it inside your own script?
    What version of Linux do you have?
    Did you select the right CGI sub-option in Zoom. (i.e. are you using the Linux CGI and not the Windows CGI, nor the Unix CGI).
    What version of Zoom are you using?
    If this is a public site what is the URL to the search function?
    2MB is a small set of index files. (1000MB+ would be a large set for the CGI). But if you think there are artifical some limits on your server you could try an even smaller set.
    Are you other CGI's perl scripts? Zoom is not a Perl script. If you have Perl and CGI mixed up in your httpd.conf file it can cause error like the one above.

    There is a FAQ that covers pretty much all of these CGI install issues.

    Comment


    • #3
      cgi woes

      To answer your questions:

      [1] The cgi is being called directly
      [2] The linux and paache info is : Apache/2.0.49 (Linux/SuSE)
      [3] The siub option for CGI/Linuz was chosen
      [4] The version of zoom is version 5.1 build 1017
      [5] The other cgi on the server is also an indexer called mnogosearch it can be seen at http://www.mnogosearch.org/
      [6] The handler is configured as outlined in the linux manual for cgi.

      Not sure what else to do?

      Comment


      • #4
        If you can E-mail us the site FTP login details we can investigate further.

        Comment


        • #5
          ftp info

          unfortunately due to client restrictions direct ftp is not possible. Could you let me know exactly what you are looking for in the ftp so that I can try and get the client to address the issues on thier own. I would really like to have this issue fixed since I have done everything I can based on suggested confirguration and still nothing. If you want you could ask for more specific details like if you want a copy of the httpd.conf file or even some info on the directory structure to and from the cgi script alias.

          Comment


          • #6
            Have you tried the smaller index files as suggested before? You can do this quite easily by re-indexing with a low limit (10 pages) or hitting "Stop indexing" early.

            The above should confirm if it is an issue with RLimitCPU or RLimitMEM, one of the possible causes of the error as detailed in this FAQ (for reference):
            Q. I get a "Premature end of script" error

            We can confirm things much quicker if given FTP access. We would only need temporary access (change your password to something temporary before giving us access, and then change it back after we're done).

            If you have telnet access, you can try to execute the CGI from the bash prompt. When executed this way (outside of a CGI context), it should return the following output:

            Code:
            Content-type: text/html
             
            <H3>Request method error</H3>
            If it fails, we need to know what error occurs when it is executed.
            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment


            • #7
              Could you let me know exactly what you are looking for in the ftp...
              To be honest, and without wanting to offend, a lot of the time we find that the customer has failed to follow the instructions. They always claim they have, but often they don't. So most of the time just checking the same points that are in the FAQ resolves the issue.

              If by some chance it is a real issue, then we need to upload a series of debug builds.

              Comment


              • #8
                executing from bash prompt

                I can sit directly at the server but what command do i issue to execute the cgi from the command prompt, I attempted to do this before but with the following command "perl search.cgi" and got the following:

                Unrecognized character \x90

                is there a comamnd to execute the cgi directly from the shell window on the server?

                As for the smaller index files I looked at the other search and the index files on that one are way over the 2meg limit so I can honestly say I do not believe that it is a memory and CPU issue.
                Last edited by Imraan; Sep-18-2008, 01:32 PM.

                Comment


                • #9
                  I will try and see how best I can get access into the server to facilitate this. No offence taken I would be glad if it was some small silly thing I overlooked.
                  Last edited by Imraan; Sep-18-2008, 01:32 PM.

                  Comment


                  • #10
                    ...attempted to do this before but with the following command "perl search.cgi"
                    As already pointed out in this post, and in the twice referenced CGI install issues FAQ. The search.cgi is NOT written in Perl. The Perl interpreter won't run it because it isn't a Perl script.

                    is there a comamnd to execute the cgi directly from the shell window
                    As it is an executable you can run it like any other Linux executable. Just type in the name of the file, search.cgi, at the prompt.

                    Comment


                    • #11
                      cgi not running at prompt

                      I tried typing the name of the file and still nothing happens it is not executing it to give me any sort of output. Is there a particular cgi executing program I may need to install on the server?

                      Comment


                      • #12
                        No, you do not need a special program to execute the CGI. It is a binary executable. If you are unable to execute it by typing in the filename, this could mean several things:
                        a) You have not given it executable permission
                        b) You do not have the current directory in your shell path. In which case, you would execute it with a prefix of "./" (to indicate current directory). For example: "./search.cgi" would launch the CGI in the current directory.
                        --Ray
                        Wrensoft Web Software
                        Sydney, Australia
                        Zoom Search Engine

                        Comment


                        • #13
                          cgi error message

                          I am getting the following error when trying to execute the binary file "cannot execute binary file" I can execute other cgi scripts in the directory but I cannot execute this one it keeps giving me this error.

                          Comment


                          • #14
                            you may be running the search.cgi on a 64bit system. type in:

                            'uname -a'

                            to see the architecture of the system. If it says 'x86_64' somewhere on the line that is returned, then you will need to have the appropriate 32bit compatibility libraries installed on the system to run the search.cgi. Or, you can do what we do and buy the Zoom SDK which will give you the source to the CGI and then you can compile it for a native 64bit linux system.

                            D

                            Comment


                            • #15
                              I have just noticed that two people are posting, "Imraan" and "ilolegislation". Are you the same person using two accounts? Or are there two different people with different problems on different servers?

                              If you are the same person, why 2 accounts?
                              If you are different people, are either of you able to E-mail us us the site FTP login details we can investigate further?

                              In my first post I asked what version of Linux you are running, but you didn't answer. But it would also be now interesting to know what hardware you have in the server. Linux can all on all types of strange hardware (Sun Sparc, PowerPC CPUs)

                              Comment

                              Working...
                              X