Each section of this tutorial depends on the ones before it. Depending on your familiarity with CGIs and LiveCode, some sections may be hard to understand if taken out of order.
HyperActive Software offers professional CGI services. If you would like us to help you develop a CGI, contact us . Since this is our business, we cannot answer email questions about LiveCode CGIs without a consulting contract. However, if you find errors in this tutorial we would appreciate a note so that we can fix them.
Introduction
- What’s a CGI?
- How they work
- LiveCode advantages
- Security
- The two ways to do LiveCode CGIs
- Installing the LiveCode engine
- Setting permissions
Simple CGIs
- The structure of a CGI script
- Things to keep in mind
- First CGI: “Hello World”
- Troubleshooting Tips
- Creating files on the server
- Example: Expanded “Hello World”
Working with text files
Working with stacks
- Example: Using stacks with CGIs
- Setting up the files
- Use of environment variables
- Parsing URL-encoded parameters
- Putting the stack in use
- Creating HTML from within the script
Using stacks as libraries
- Using the library command
- Advantages of the library method
- Changing the Addresses example
- The LibCGI library
Appendix: Debugging text-based CGIs
- Debugging LiveCode CGIs
- Quick Checklist
- Other Debugging Techniques
- Determining Environment Variables
- Other Online References