PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

CGI Script Problem - Ready to Scrap the Search Idea

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

  • CGI Script Problem - Ready to Scrap the Search Idea

    Here's my problem... I thought I'd buy a script that was easy to use and setup.... not finding that is the case...

    I have 25,000 plus pages on my site... I have index it about 5 times now... I have tried the PHP option and found that I needed to raise the MAX MEM limit in the php.ini file to 128 Megs -- Unacceptable since this is not a dedicated server and I can not use 128Megs of ram for each search...

    I then tried to use the CGI option... well come to find out that the CGI that Zoom produces is NOT CGI at all - it is semi-compiled binary file... and will not run in a standard installation of Linux Enterprise Edition (of which many hosting companies run).

    I now find out that I need to make modifications to my http.conf file which I am not happy about. Futher I have read many post in this forum and not 1 example of what to change or what to look for? I would think there would be a simple work around like adding an htaccess file to the directory with some http config changes... since I am not running the cgi in the cgi directory. (yes, I can run regular perl scripts in that directory... just not search.cgi

    I tried this but it did not work... it seemed to work for some else in here.

    <Location /var/www/html/search/>
    Options +ExecCGI
    SetHandler cgiHandler
    </Location>

    The FAQ also states info about suEXEC, but again no information to FIX THE PROBLEM other than file permissions which are set correctly...

    I fear I have wasted 99 bucks... so I need some help? How to change the conf file.... or a CGI script that works in a standard Linux environment like most hosting companies use....

    Anybody out there that can help? Would be appreciated... I own the server that it is running on, but it is also a hosting server with many clients on it... so I can't make too many config changes that will effect other users and break my clients code.

    Thanks

  • #2
    I have tried the PHP option and found that I needed to raise the MAX MEM limit in the php.ini file to 128 Megs.
    I am surprised that you need this much. I would have thought that maybe 64MB would have been enough. But the full content of 25,000 pages it a fair amount of data to index. As we don't have any idea about the content of the pages or the size of each of the documents it is a bit hard to comment.

    Most web servers have about 1GB of RAM now days. Using 10% of this amount of a few seconds should not be much of a load.

    I have index it about 5 times now...
    To speed up your experimentation maybe just index 50 pages initially. Once it works for 50 pages, it will work for 25,000 pages.

    ...well come to find out that the CGI that Zoom produces is NOT CGI at all
    You are incorrect. I can only assume that you don't know what CGI is.

    Many people think that CGI is the same as a Perl script, but this not true. CGI is an interface definition between a web server and an external application (Common Gateway Interface) and has no directly link to the Perl language. See this page for a more detailed explanation,
    http://hoohoo.ncsa.uiuc.edu/cgi/intro.html

    The Zoom CGI version is written in C++ and is compiled to a binary executable (to get the most speed). So you will never be able to edit the CGI binary executable. We take the C++ source code and compile it on Windows, Linux and BSD Unix to produce 3 different binary executable files. This means that the search.cgi file is exactly the same as any other Windows or Linux executable. For example you can rename search.cgi to search.exe and run it directly from Windows.

    ...it is semi-compiled binary file
    Fully compiled to x86 CPU machine code in fact.

    ...and will not run in a standard installation of Linux Enterprise Edition
    Also incorrect. The CGI should and does run all on all x86 hardware on BSD Unix, Linux & Windows. We have tested several different flavours of Linux and know of none where it doesn't work.

    It will not run on Linux / Mac hardware or Linux / Sun hardware however. You need to be running on a host with an Intel / AMD x86 based CPU.

    I am unsure why you don't think it will not run. You have given no details of the problem you had, no error messages, no example links, etc... So it is hard to suggest a solution when we don't know the problem.

    You might be confusing Linux with Apache. It is Apache that calls the CGI not Linux. Linux is the operating system. Apache is the web server software.

    I now find out that I need to make modifications to my http.conf file.
    I am unsure why you think you need to modify this Apache file.

    Futher I have read many post in this forum and not 1 example of what to change or what to look for?
    This is becuase you don't normally need to edit this file. As this is something that is not normally required, information is thin on the ground.

    I would think there would be a simple work around...
    A work around for what? You haven't told us what the actual problem is that needs working around.

    We are happy to try and help but we need some basic details.
    1) What is the link to your search function?
    2) What version of Linux / Apache are you running?
    3) What error messages did you see?
    4) What (non default) settings did you select in Zoom?
    5) Are you running on a x86 based hardware (and not Sun / Mac, etc..)
    6) Did you have a read of this page, which has common CGI issues and solutions. http://www.wrensoft.com/zoom/support/faq_cgi.html

    -----
    David

    Comment


    • #3
      Sorry for my frustration

      Thank you for your post and I am sorry about my frustration... I doubled check everything in the check list... and it seems that WS_FTP Pro automatically uploads anything with a .cgi extension in ASCII format.... I uploaded the search.cgi in Binary and all is fine.

      Thank You... and again... I am sorry if I sounded frustrated.

      Bob

      Comment


      • #4
        Glad you sorted it out.

        The FTP upload in ASCII mode, with 3rd party FTP software, is a common problem. It was one of the reasons why we included an FTP upload function as part of Zoom. It avoids the use of 3rd party software and gets the ASCII / Binary mode right.

        -----
        David

        Comment

        Working...
        X