View previous topic :: View next topic |
Author |
Message |
lestat -
Joined: 15 Sep 2003 Posts: 130 Location: GREEN BAY
|
Posted: Wed Nov 12, 2003 8:18 pm Post subject: New to CGI. What seetings do I need to change |
|
|
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 |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Nov 13, 2003 4:14 am Post subject: Re: New to CGI. What seetings do I need to change |
|
|
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 |
|
|
lestat -
Joined: 15 Sep 2003 Posts: 130 Location: GREEN BAY
|
Posted: Thu Nov 13, 2003 3:44 pm Post subject: |
|
|
So this will not work with .php pages then? |
|
Back to top |
|
|
lestat -
Joined: 15 Sep 2003 Posts: 130 Location: GREEN BAY
|
Posted: Thu Nov 13, 2003 3:47 pm Post subject: |
|
|
1 additional q: Do I need to have a form tag or something in the header for this to work? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Fri Nov 14, 2003 3:44 am Post subject: |
|
|
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 |
|
|
lestat -
Joined: 15 Sep 2003 Posts: 130 Location: GREEN BAY
|
Posted: Fri Nov 14, 2003 11:39 pm Post subject: |
|
|
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 |
|
|
Axis -
Joined: 29 Sep 2003 Posts: 336
|
Posted: Sat Nov 15, 2003 12:51 am Post subject: |
|
|
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 |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sun Nov 16, 2003 9:23 pm Post subject: |
|
|
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 |
|
|
lestat -
Joined: 15 Sep 2003 Posts: 130 Location: GREEN BAY
|
Posted: Mon Nov 17, 2003 6:02 pm Post subject: |
|
|
Welp that would explain why it waan't working then. :oops:
Thanks so much for the help!
This server is great! |
|
Back to top |
|
|
Iwalter -
Joined: 17 Dec 2003 Posts: 4
|
Posted: Wed Dec 17, 2003 6:03 pm Post subject: |
|
|
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 |
|
|
|