LiveCode Server with Stacks
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 38
- Joined: Thu Jul 04, 2013 1:29 pm
LiveCode Server with Stacks
Now LiveCode CGI without Stacks are working, I started to try to create CGI using stacks.
The stack is a simple database stack with one background field called MyField.
MyDatabase.lc is as follows:
<?lc
set the errorMode to "inline"
?>
<html>
<head>
<title>My LiveCode Database Test Page</title>
</head>
<body>
<h1>My LiveCode Database Test Page</h1>
<?lc
go stack "MyDatabase.livecode"
put "<p>Card 1</p>"
put "<br>" & card field "MyField" & "</br>" & crlf
put "<p>Card 2</p>"
go next
put "<br>" & card field "MyField" & "</br>" & crlf
put "<p>Card 2</p>"
go next
put "<br>" & card field "MyField" & "</br>" & crlf
?>
</body>
</html>
I saved it and typed the URL of the CGI in Safari, but the loading stops. It doesn't respond. Any suggestions?
The stack is a simple database stack with one background field called MyField.
MyDatabase.lc is as follows:
<?lc
set the errorMode to "inline"
?>
<html>
<head>
<title>My LiveCode Database Test Page</title>
</head>
<body>
<h1>My LiveCode Database Test Page</h1>
<?lc
go stack "MyDatabase.livecode"
put "<p>Card 1</p>"
put "<br>" & card field "MyField" & "</br>" & crlf
put "<p>Card 2</p>"
go next
put "<br>" & card field "MyField" & "</br>" & crlf
put "<p>Card 2</p>"
go next
put "<br>" & card field "MyField" & "</br>" & crlf
?>
</body>
</html>
I saved it and typed the URL of the CGI in Safari, but the loading stops. It doesn't respond. Any suggestions?
-
- Posts: 38
- Joined: Thu Jul 04, 2013 1:29 pm
Re: LiveCode Server with Stacks
typo:
Card 3
Card 3
Re: LiveCode Server with Stacks
Hi turbolaserguy,
I am not sure that you can actually "GO" to a stack with LC server?
My understanding is that you can currently only use stacks as (script-)libraries:
...
<?lc
start using stack "my_library.livecode"
?>
...
I may be wrong
Best
Klaus
I am not sure that you can actually "GO" to a stack with LC server?
My understanding is that you can currently only use stacks as (script-)libraries:
...
<?lc
start using stack "my_library.livecode"
?>
...
I may be wrong

Best
Klaus
-
- Posts: 38
- Joined: Thu Jul 04, 2013 1:29 pm
Re: LiveCode Server with Stacks
Ah, I see, but I think is just an alternative way of loading the stack as a library.
And it obviously does not work for you the way you exspect it
And it obviously does not work for you the way you exspect it

-
- Posts: 38
- Joined: Thu Jul 04, 2013 1:29 pm
Re: LiveCode Server with Stacks
Klaus,
No, no! If you go to stacks in CGI, you can use the background field values as card-based database! You don't need SQL. I've done it before (about 4 years ago) on RunRev server! (I lost the code I wrote in that day)
No, no! If you go to stacks in CGI, you can use the background field values as card-based database! You don't need SQL. I've done it before (about 4 years ago) on RunRev server! (I lost the code I wrote in that day)
Re: LiveCode Server with Stacks
Ah, OK, did not know this! But then your original script should work, right!?
Maybe you could add a TRY stucture to your code and see if there is an error of any kind?
All of the file permissions are correct on the server?
Maybe you could add a TRY stucture to your code and see if there is an error of any kind?
All of the file permissions are correct on the server?