Previous Thread
Next Thread
Print Thread
Rate Thread
#104281 08/12/2001 1:18 PM
Joined: Jan 2000
Posts: 254
Likes: 4
Beta Tester
Beta Tester
Joined: Jan 2000
Posts: 254
Likes: 4
My host provider states that SSI works using .stm for an extension. But I have been unable to call a .CGI file. They tell me to research how to use it.
I am using #exec cgi in the statement and all I get is a blank page.
I tried several include statements that did not work correctly either.
I am able to call asp or htm files successfully.
Can anyone suggest something I can try at the very least to verify if my provider does allow ssi for a cgi file?


There is no such thing as stupid questions.
Just stupid answers.
Sponsored Links
#104282 08/14/2001 1:40 AM
Joined: Jul 2001
Posts: 272
Member
Member
Offline
Joined: Jul 2001
Posts: 272
Having the same difficulties except trying to do it through FP.

#104283 09/26/2001 10:45 PM
Joined: Feb 2001
Posts: 78
Member
Member
Offline
Joined: Feb 2001
Posts: 78
I have found when all else fails with SSI

Use this instead


#104284 09/29/2001 10:58 PM
Joined: Sep 2000
Posts: 18
Junior Member
Junior Member
Offline
Joined: Sep 2000
Posts: 18
CGI can be called on using many different codes via SSI.


or
amongst some of the examples

The thing with SSI though is that it only INCLUDES the file, it doesn't actually do the executing.. what does this mean? Well simply this, your script HAS to be working first before you can include it.. so if its bringing up a blank page then your CGI coding could be bad.

Now there is also the chance of it not being in the right directory pattern (note that it must be from your root directory). However since you said it turns out blank, I ruled this out because when an file cannot be found by the SSI include or exec tag, it usually will give you an error line.

So my advice is to check your CGI if it is functioning first before trying anything else.

Also Note that SSI tags cannot be executed within CGI unless specially coded to manipulate it, but thats way beyond my knowledge there smile

#104285 10/02/2001 1:56 PM
Joined: Jan 2000
Posts: 254
Likes: 4
Beta Tester
Beta Tester
Joined: Jan 2000
Posts: 254
Likes: 4
Actually I used the test file hello.cgi included with the UBB installation files.
Which when run from a browser works fine.
I also placed them in the same directory together to eliminate path problems.I have tried shtml stm
with and .
Could the ISP have something turned off for file extensions of .cgi only?


There is no such thing as stupid questions.
Just stupid answers.
Sponsored Links
#104286 10/03/2001 3:16 PM
Joined: Sep 2000
Posts: 4,211
Master Hacker
Master Hacker
Joined: Sep 2000
Posts: 4,211
It should come as no surprise that the function of SSI depends heavily on the configuration of the server. My instructions use SSI commands that work for NCSA HTTPd Server Side Includes, and specifically, those documented in the Apache server's mod_include module.

Server Side Include commands have the following format:
Code
code:
The element is one of the predefined functions that Server Side Includes can perform, such as include or echo.

The command also includes one or more attribute/value pairs that provide the specific parameters to the function.

There are a few important things to note about SSI command syntax:
  • The whole command must be enclosed within comment indicators ().
  • The comment terminator (-->) must be preceded by a space to make it clear that it is not part of the SSI information.
  • Keep the whole command on one line (line breaks between the comment tags may cause the SSI not to function).
  • The # symbol is an important part of the command and must not be omitted.



Example: Virtual Includes

The simplest type of Server Side Include is a "virtual include," which tells the server to add information to a file before sending it to the browser.

Code
code:

The command in the above example uses the include element, which inserts the text of another document into the parsed file. The include element uses the virtual parameter to specify the URL of the document to be inserted, in this case, navtable.html.

Many webmasters label these fragment files with the .htmlf suffix to keep them distinct from normal HTML documents, although it's not necessary.

Example: Executing Scripts

exec cmd|cgi="string"

Executes external programs and inserts the output in the current document.

Attributescgi - Provides the relative URL path to the CGI script.
Code
code:

cmd - Specifies any shell program on the server. The SSI variables are available to the command.
Code
code:

One Last Note on Virtual Includes

The virtual attribute specifies a URL relative to the document being parsed. The URL cannot contain a scheme or hostname. If it does not begin with a slash (/) it is taken to be relative to the current document.

[ 10-03-2001: Message edited by: Matt Jacob ]


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,575
Posts293,931
Members13,823
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)