Running Jaqueline's CGI tutorial in JaguarPC

Alejandro Tejada capellan2000 at yahoo.com
Sat Dec 3 09:53:28 CST 2005


Hi all,

yesterday, i was testing 
Jaqueline's CGI tutorial
in my website in JaguarPC.

Jaqueline had made a great
service for the developer 
community, publishing this
tutorial in his website.

Thanks again, Jaque! :-)

i got mixed results, following
the steps detailed, surely because
my own particular configuration
in my website.

These examples works fine:
1- Visitor counter
2- Random content
<http://www.hyperactivesw.com/cgitutorial/scripts2.html>

but scripts that try
to load a file by reference
or access a stack
do not work.

Trying to load a reference of 
the file like this produces an error:

-- start of example from CGI tutorial

<http://www.hyperactivesw.com/cgitutorial/scripts2.html>
put "tipTemplate.txt" into theTemplateFile
if there is no file theTemplateFile then
put "Error: template missing" into theData
else
put url ("file:"&theTemplateFile) into theData

-- end of example from CGI tutorial

But... reading directly a file content 
and putting it in a variable, 
works just fine:

#!Revolution

on startup
    put url "file:tipTemplate.txt" into theData
    put offset("[*]",theData) into theStartChar
    put url "file:tips.txt" into theTFile
    put any line of theTFile into char theStartChar to
theStartChar+2 of theData
  
  # write minimal set of HTTP headers to stdout
  put "Content-Type: text/html" & cr
  put "Content-Length:" && the length of theData & cr
& cr
  put theData
end startup

Why this happen in my website?
Looks like the file reference 
it's lost or misinterpreted by
the engine. i suspect that something
similar happens when the engine try 
to load a stack, like the "adresses.rev"
used in the example of this page:

<http://www.hyperactivesw.com/cgitutorial/scripts3.html>

How could i debug this script and know
exactly what is the command or function
that fails when reading or writing to
reference files or stacks?

Notice that i could read and write to 
text files inside the CGI folder.

Thanks in advance!

al




Visit my site:
http://www.geocities.com/capellan2000/


		
__________________________________________ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 



More information about the metacard mailing list