Results 1 to 9 of 9
  1. #1

    ssi problem with apache core 1.3.34

    Hi

    after moving to a new dedicated server im facing a problem with an include string which articlemanager scripts needs to have a search engine friendly page

    the string is :
    <!--#include virtual="/cgi-bin/magazine/exec/search.cgi?start=1&perpage=7&cat=25&template=search/search_results_content.html"-->

    and the online documination of my host says the following:

    -----------------------------
    All the environment variables passed to the CGI script are the same as those for the shtml file itself.
    So, you cannot pass a query string using a question mark (?), as in:
    <!--#exec cmd="hello.cgi?query" -->
    The query string passed to the CGI script will be the same as the query string passed to the shtml file itself. If this file were referenced as "ssi.shtml?snort", than the word "snort" would also be passed to the "hello.cgi" script above.
    ---------------------------

    which is very strange bacause i've been using this include for the past 3 years with two defferent hosts

    i wonder if there is anything to change in apache1.3.34 configuration or modulars to allow such an include to parse, all i'm getting now out of this include is garbled text

    Regards

  2. #2
    any help please

  3. #3
    Join Date
    Sep 2000
    Location
    Alberta, Canada
    Posts
    3,109
    As different Servers are setup different ways, it is quite possible you have to make some changes.

    As stated in the example you gave:

    use this <!--#exec cmd=

    not this <!--#include virtual=


    Always have a blank space in your closing comment tag:

    content.html"--> not correct

    content.html" --> this is correct


    HTH
    PotentProducts.com - for all your Hosting needs
    Helping people Host, Create and Maintain their Web Site
    ServerAdmin Services also available

  4. #4
    Thanks Rob, i've changed the code to the following:

    <!--#exec cmd="/cgi-bin/magazine/exec/search.cgi?search=1&perpage=999999&template=search/search_results_minimal.html" -->

    but now the output is a blank page!!

  5. #5
    Join Date
    Sep 2000
    Location
    Alberta, Canada
    Posts
    3,109
    Ok, now let's find out if there are any script errors.

    #!/usr/bin/perl

    BEGIN {
    $| = 1;
    open(STDERR, ">&STDOUT");
    print "Content-type: text/plain\n\nScript Error\n";
    }

    Put that code at the begining of the script and it will print out any error msgs. in a somewhat, easier to understand format than than Apache would. Once you have corrected the errors then remove the code; as it will always print "Script Error" even if there are none.
    PotentProducts.com - for all your Hosting needs
    Helping people Host, Create and Maintain their Web Site
    ServerAdmin Services also available

  6. #6
    Join Date
    May 2001
    Location
    HK
    Posts
    3,076

    Smile

    I think you can only put query string for 'include virtual= .... '

    You can execute commands, but it seems that your command should be /usr/bin/perl /full/path/to/your/script.cgi

    And you can't have query string for exec cmd I think ~

    If it shows up a blank page, then probably something wrong with your script.
    Check to see if it shows anything when you execute the script before putting it on SSI ~

    If you want to using ssi to embed the output of the script, use the <!--#include virtual="/myscript.cgi?query=whatever"--> and the query string will also pass to the cgi script ~
    Last edited by YUPAPA; 11-06-2005 at 12:09 AM.

  7. #7
    Quote Originally Posted by Website Rob
    Ok, now let's find out if there are any script errors.

    #!/usr/bin/perl

    BEGIN {
    $| = 1;
    open(STDERR, ">&STDOUT");
    print "Content-type: text/plain\n\nScript Error\n";
    }

    Put that code at the begining of the script and it will print out any error msgs. in a somewhat, easier to understand format than than Apache would. Once you have corrected the errors then remove the code; as it will always print "Script Error" even if there are none.
    Dear Rob

    didn't know in which script file i have to add this code so i created a test.cgi file, added the code and it just shows "script error"

    the strange thing is that i found an error_log file that was created in the cgi-bin directory of the script " wasn't there before the move " inside it :
    [06-Nov-2005 05:19:52] PHP Warning: Zend Optimizer does not support this version of PHP - please upgrade to the latest version of Zend Optimizer in Unknown on line 0
    [06-Nov-2005 06:10:00] PHP Warning: Zend Optimizer does not support this version of PHP - please upgrade to the latest version of Zend Optimizer in Unknown on line 0
    i've reinstalled zend optimizer yesterday for a php script but why is it affecting cgi?!

    is there a way to check if cgi is working probably in the server?

  8. #8
    Quote Originally Posted by YUPAPA
    I think you can only put query string for 'include virtual= .... '

    You can execute commands, but it seems that your command should be /usr/bin/perl /full/path/to/your/script.cgi

    And you can't have query string for exec cmd I think ~

    If it shows up a blank page, then probably something wrong with your script.
    Check to see if it shows anything when you execute the script before putting it on SSI ~

    If you want to using ssi to embed the output of the script, use the <!--#include virtual="/myscript.cgi?query=whatever"--> and the query string will also pass to the cgi script ~
    Dear YUPAPA

    i did try that but it didn't work

    just cant believe that a support ticket in liquidweb.com is open for 10 days now without a reply!!! this is my worst experience with a webhost for the past 6 years they are not even being able to tell me how did they setup the server!!!

    the script with the include above was perfictlly working with my old hosts

  9. #9
    Join Date
    May 2001
    Location
    HK
    Posts
    3,076

    Smile

    Do SSI work at all?

    Let say you want to include a file, in the SSI includes a file myfile.txt by doing:
    <!--#include file="myfile.txt"-->

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •