Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 10 of 10

This is a discussion on Persistent error on web page in the Shared & Semi-Dedicated forum
On a previous server, I was using a script called "Tell me what you think" for adding user comments at the bottom of a web ...

  1. #1
    JPC Member
    Join Date
    Apr 2003
    Location
    Outer Space
    Posts
    7

    Question Persistent error on web page

    On a previous server, I was using a script called "Tell me what you think" for adding user comments at the bottom of a web page, and it worked very nicely. But now I'm getting the following error when trying to implement a perl script to add text to the bottom of my pages through SSI:

    an error occurred while processing this directive




    This is the code on the web page (I have to get to the cgi directory by going back one directory, hence the "../"):

    <!--#include virtual="../cgi-bin/comments/comments.pl?page=index.shtml&action=view "-->



    I've played with the above line again and again but keep getting the same error as above. Could I possibly have something wrong in the script itself?

    Thanks!

  2. #2
    Loyal Client
    Join Date
    Sep 2001
    Location
    Wichita, KS
    Posts
    1,647
    that is the wrong SSI directive. I think you need something more along the lines of an exec. I'd recommend chacking out google and seeing what you can find on SSI commands.

  3. #3
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    I don't think #include statements support the .. notation. If my memory serves me correct (its been about five years since I've used any form of SSI anywhere), the virual="" argument needs to start with a slash. So, if the cgi-bin you refer to is at the top of your site (ie in public_html), just remove the .. and make it /cgi-bin/comments/comments.pl?....

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  4. #4
    JPC Addict mike7727's Avatar
    Join Date
    Dec 2002
    Location
    Maine
    Posts
    126
    According to my CGI-101 book: "On the virtual include, you aren't including the full Unix path to the filename, but rather the path from the root directory of the web server. So if your server's root directory is /web/kira, and you have an include file in /web/kira/include/botbar.inc., then the virtual path is "/include/botbar.inc". (Or, if you're using a public_html directory and your homepage is located at http://hourhost.com/~yourname/, include files in your public_html/include dir can be included with the virtual path "/~yourname/include/botbar.inc".)

  5. #5
    JPC Member
    Join Date
    Apr 2003
    Location
    Outer Space
    Posts
    7
    Wierd thing is, that the path I used in my original post worked just fine with my old server. But, that might be comparing apples to oranges. :-)

    I've tried the following tonight (and I do have my own domain name):

    /cgi-bin/comments/comments.pl
    /akdreamer/cgi-bin/comments/comments.pl
    /www/akdreamer/cgi-bin/comments/comments.pl
    /web/akdreamer//cgi-bin/comments/comments.pl

    ...as well as some I don't even remember now.

    BTW, I have tried changing "include" to "exec" with no results at all. I've also tried taking out "virtual". I've been on Google and lots of tutorial sites, and from what I'm seeing, using "#include virtual=" is correct, and in fact, is what the author of the script says to use. Like I said, it worked before.

    Back to gritting my teeth.... :-)

  6. #6
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Hello, neighbor! I live over the hill and around the bend from you in Payson...

    I wish I could add to this discussion, but I'm in the same boat as Jason. I lived by CGI/PERL until I Nuked my site and few months ago. I actually find PHP very similar in a lot of ways, but for the life of me, I can't remember enough to offer any help, and that makes me sad, I guess. I didn't even realize it until now. LoL!

    I code mostly in PHP, CSS, Javascript and HTML. I can't seem to break away from HTML, as hard as I try. And, of course, this all runs on top of MySQL. That's where it's at these days. I'm not flamin' or anything, but you might consider jumping in; the water's fine!

    Anyway, I just wanted to pop in a say, "hello." Most of the ppl I deal with now are in Thailand, Greece or wherever. I'm a nightbird and these are usually the only ppl online when I am. They're 10,000 miles away, not 50, you know...

    Good luck to you...
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  7. #7
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Are you sure that the error is in the SSI directive and not the script itself? Try calling the script through your browser and see what happens. It may or may not work, depending on how it was written, but it might point you in the right direction.

    If it doesn't work through the browser, try running it from the command line in SSH. If everything is set up correctly and your permissions are correct, the following command should dump a bunch of HTML to your terminal window:

    ~/public_html/cgi-bin/comments.pl

    Good luck...

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  8. #8
    JPC Member
    Join Date
    Apr 2003
    Location
    Outer Space
    Posts
    7
    Here are the settings I have in the script itself. The info for what to use in here was taken from Jaguar's support page, as well as knowing what worked in the past:

    #!/usr/bin/perl

    #Your mail program (sendmail, mail, etc)
    $mail_prog = '/usr/sbin/sendmail' ;
    #Set this to 1 if you want want to be mailed each tima an user send a comment. Otherwise, leave it 0 (zero)
    $send_notify = 0;
    #Your email
    $webmaster = "julieann\@akdreamer.com";
    #Parsing the form input
    &GetFormInput;
    #Path (not URL) to your comments' cgi directory.
    $root_dir = "/home/akdreamer/www/cgi-bin/comments";
    #URL (not PATH) to your comments cgi.
    $root_url = "http://www.akdreamer.com/cgi-bin/comments/comments.pl";
    #if your server allows you to use the flock command, set this variable to 1. Otherwise, leave it 0 (zero)
    $lock = 0;

  9. #9
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Check to make sure that the script is chmodded to 755. If not, the server won't be able to run it and will throw a script error.

    Unfortunately with SSI all errors are displayed as "an error occurred while processing this directive." Not very helpful....

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  10. #10
    JPC Member
    Join Date
    May 2003
    Location
    Canada
    Posts
    46
    Try looking in your error log as well. Apache/Perl should dump some info there

Bookmarks

Posting Permissions

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