How do I install LiveCode Server?

The LiveCode Server product brings our English like language to the server environment. The server engine is a separate build of the LiveCode engine with specific syntax and functionality that makes it suitable for use in command-line contexts and, in particular, as a CGI processor.

This lesson will walk you through the steps required to install LiveCode Server on your platform.

LiveCode Server Distribution

LiveCode Server is included with any Indy or Business purchase of LiveCode. To download it check your LiveCode account, you will find a tab labeled "Server". In this tab you will find your username and password (1) to download Server, as well as download buttons (2). You can select your Server version in the drop down menu (3).

 

 To begin downloading, click on the download button for your platform and enter the login credentials when prompted.  

Once downloaded, you can unzip and explore the contents.  Your LiveCode server package should look similar to the image above, containing the server engine itself, the externals, the database drivers and the release notes.  You are now ready to begin running LiveCode Server.

LiveCode Server Distribution

Command Line Mode

Command Line Mode

The LiveCode Server engine can be run in two modes:  Command line mode and CGI mode.  To run the engine in command line mode, open up a command prompt and execute the "livecode-server" ("livecode-server.exe" on Windows) binary, passing the script name you wish to run as the first argument.

Consider a script script named "myscript.lc" in the same folder as your LiveCode Server engine, containing the following commands:

<?lc

  put "Hello World!" && the date && the time

?>

The image above demonstrates how to execute the script along with the expected output.

CGI Mode

The second mode the LiveCode Server engine can be run in is CGI mode.  Running LiveCode server in CGI mode allows you access your LiveCode script files using HTTP i.e. as web pages.  For example, if you have a script named myscript.lc, when run in CGI mode, you will be able to access it by typing the URL of the script into your web browser (e.g. http://www.my_site.com/myscript.lc).

In order to do this, your machine must have a web server package installed and .lc file extensions mapped to the LiveCode Server engine.

The most common web server package available is Apache and is available for most platforms.  If you have access to your systems Apache configuration files, see the following lessons:

If you don't have access to your system's Apache configuration, see the lesson "How do I install LiveCode Server with Apache via .htaccess?".

For more detailed information on installing LiveCode server, see the server release notes distributed with the server package.

0 Comments

Add your comment

E-Mail me when someone replies to this comment