PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Some confusion....php and cgi

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

  • Some confusion....php and cgi

    I have read this page:
    http://www.wrensoft.com/zoom/support...i.html#ssi_cgi

    But I am a bit confused....

    I have been using the PHP version of the script but now am reaching the limitation of the php script.. so i though that I would use teh CGI version...

    But a problem I have...

    the CGI works fine.. but of course my customized page is not being used (index.php - heavely modded search.php page) I can deal with the css to change the page look and feel.. but I have added database driven drop downs to assist with picking for key words. my page looks great.

    But in reading your SSI help page.. it says to use a virtual include for hte CGI into the php page. well.. what do i dont and do need in the search.php (index.php) page? and how do i feed the search string.. I mean i see the example in yor page.. but it doesnt make sence to me.

    I can include my index.php if i must...

    It would be MUCH easier if I could change the template from HTML to PHP
    ____________________________
    Terry Remsik

  • #2
    Exactly which bit don't you understand. This is the example we gave to call the CGI from a custom PHP script.

    Code:
    //Your PHP code here
    
    $QSTRING = $_SERVER['QUERY_STRING']; 
    while (list ($header, $value) = each ($HTTP_GET_VARS)) 
    { 
      $QSTRING = $QSTRING.'&'.$header.'='.$value; 
    }
    virtual("/cgi-bin/search.cgi".'?'.$QSTRING);
    
    //More of your PHP code here
    There is really only 1 interesting command, "virtual" and one variable, "QSTRING". So it would seem fairly straight forward.

    There are a few other things to be aware of, but they are detailed in the FAQ points.
    http://www.wrensoft.com/zoom/support...i.html#ssi_cgi

    -----
    David

    Comment


    • #3
      Thanks for the reply....

      it says I have an undefied function call .. virtual() ???
      ____________________________
      Terry Remsik

      Comment


      • #4
        The PHP documentation for Virtual is here,
        http://php.planetmirror.com/manual/e...on.virtual.php

        Are you using Apache as your web server?

        Note that if you are using, the Netscape, iPlanet, or SunONE webservers, then you need to replace "virtual()" with "nsapi_virtual()".

        -----
        David

        Comment


        • #5
          um.. according to your link ...

          http://php.planetmirror.com/manual/e...on.virtual.php

          that is an apache specific function...

          I am running IIS>.. suggesiton?
          ____________________________
          Terry Remsik

          Comment


          • #6
            It's not all that common to use PHP on an IIS server, but it is, of course, possible. But because it is far more common for IIS servers to only support ASP, we have thus far only provided an ASP solution for IIS users.

            We've now updated the FAQ page with a different solution for PHP on IIS. Take a look at the updated solution:
            http://wrensoft.com/zoom/support/faq_ssi.html#ssi_cgi

            The other possibility is to consider creating an ASP page for your CGI, since almost all IIS installations have ASP enabled. This is also explained in the above FAQ.
            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment


            • #7
              ok.. i will check this out as soon as i get to work (in about 1.5 hours)

              LOL ... i am staying a way for asp since all my dev is php based. trying to get away form M$...

              Will be moving my CMS to solaris soon...

              Thanks for the post and will let you know how it goes!
              ____________________________
              Terry Remsik

              Comment

              Working...
              X