New to CGI. What seetings do I need to change

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
lestat
-


Joined: 15 Sep 2003
Posts: 130
Location: GREEN BAY

PostPosted: Wed Nov 12, 2003 8:18 pm    Post subject: New to CGI. What seetings do I need to change Reply with quote

I installed perl per apreliums instructions. I am new to this so I think I am still missing something. I started with a small script I grabbed from a website. It is a "last modified" script.

I put the .cgi file in the cgi-bin
The readme that comes with the script told me to add this line in my html page:
Code:
<!--#include virtual="cgi-bin/lastmod.cgi" -->


Now, this works if I link it <a>code</a> to the code. This of course directs the browser to a different page displaying the information. I want it to display in the html page where I put that code.

Am I missing a bit of code to instruct this code to place the data where I want? Do I need to change a setting on my server(dont think so)?

Thanks! :?:
Back to top View user's profile Send private message AIM Address MSN Messenger
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Thu Nov 13, 2003 4:14 am    Post subject: Re: New to CGI. What seetings do I need to change Reply with quote

lestat,

If you can browse the script directly and if it works then all is fine.

All you have to do is to put the SSI code in a page which extension is .shtml, .shtm, or .stm . If you don't like these extensions, you can customize them (or even add you own ones) in the SSI Parameters in the console.

Next, you should use the code
Code:
<!--#include virtual="/cgi-bin/lastmod.cgi" -->


The virtual path must begin with a slash (to make the cgi script reachable from any directory on your web site).
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
lestat
-


Joined: 15 Sep 2003
Posts: 130
Location: GREEN BAY

PostPosted: Thu Nov 13, 2003 3:44 pm    Post subject: Reply with quote

So this will not work with .php pages then?
Back to top View user's profile Send private message AIM Address MSN Messenger
lestat
-


Joined: 15 Sep 2003
Posts: 130
Location: GREEN BAY

PostPosted: Thu Nov 13, 2003 3:47 pm    Post subject: Reply with quote

1 additional q: Do I need to have a form tag or something in the header for this to work?
Back to top View user's profile Send private message AIM Address MSN Messenger
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri Nov 14, 2003 3:44 am    Post subject: Reply with quote

lestat wrote:
1 additional q: Do I need to have a form tag or something in the header for this to work?

SSI directives can be included in any HTML page. Can you explain us exactly what do you mean when you speak about PHP/Forms in this case?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
lestat
-


Joined: 15 Sep 2003
Posts: 130
Location: GREEN BAY

PostPosted: Fri Nov 14, 2003 11:39 pm    Post subject: Reply with quote

I noticed it was mentioned several times that one needs to only include SSI/CGI type code in .shtml or .html

I was wondering if this type of code would work in .php pages?

I just cant get that lastmod.cgi code to disply anything to me. But it does work when I use the link.

I think I need a book.
Back to top View user's profile Send private message AIM Address MSN Messenger
Axis
-


Joined: 29 Sep 2003
Posts: 336

PostPosted: Sat Nov 15, 2003 12:51 am    Post subject: Reply with quote

Hi lestat--

Have you tried adding "php" in console/advanced/ssi parameters/SSI Associated Extensions?

I don't know if that will work as I am not using php but adding "html htm" works to get includes working on html and htm pages.

Good luck!
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun Nov 16, 2003 9:23 pm    Post subject: Reply with quote

lestat,

You can't mix SSI directives and PHP statements in the same page. You must choose between both technologies. For your information, if are writing a PHP page, it is unecessary to use SSI. Most SSI directives have their one-line-code equivalent in PHP. So it is easier/fatser to write your page 100% PHP.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
lestat
-


Joined: 15 Sep 2003
Posts: 130
Location: GREEN BAY

PostPosted: Mon Nov 17, 2003 6:02 pm    Post subject: Reply with quote

Welp that would explain why it waan't working then. :oops:

Thanks so much for the help!
This server is great!
Back to top View user's profile Send private message AIM Address MSN Messenger
Iwalter
-


Joined: 17 Dec 2003
Posts: 4

PostPosted: Wed Dec 17, 2003 6:03 pm    Post subject: Reply with quote

lol I tried installing that script too and it worked but the date is way off it says:

December 31, 1969 at 19:00

Guess, I better go figure out what thats all about.
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group