LiveCode LessonsLiveCode LessonsHow To - LiveCode Server TasksInstalling LiveCode ServerHow do I choose which LiveCode Server engine to use with On-Rev?

How do I choose which LiveCode Server engine to use with On-Rev?

With each new build of the LiveCode server engine, the On-Rev servers are updated.  By default, scripts with the .lc extension are be executed using the latest engine.  This lesson will show you how to select a specific engine version to execute your scripts.

Create a .htaccess file

The engine version selection will be achieved using a htaccess configuration file.  A htaccess file allows you to set and alter various web server options for the current directory and all it sub-directories.

To do this, create a file named .htaccess in the appropriate directory.  If you want the changes to effect all your scripts, place it in your public_html directory.  Otherwise, place it in the desired sub-directory.

Choose your extension

Next, you need to choose the file extensions you want to effect.  By default, the .lc extension maps to the latest build of the LiveCode server engine.  The .irev extension maps to the RevServer engine.  You can either create a new extension to map to specific engine versions (e.g. .lc463, .lc464) or just overwite the defaults (.lc and .irev).

To add the extension, you need to create a new line in your htaccess file.  The line is of the form:

AddHandler <extension_name> <extension>

Some examples of this are as follows:

AddHandler livecode-script .lc
AddHandler livecode-463-script .lc463
AddHandler livecode-464-script .lc464
AddHandler irev-script .irev

Map extension to a engine version

Now that you have added your extension, you must map it to an engine version.  To do this, you need to add a line to your htaccess file of the following form:

Action <extension_name> <engine_path>

On the On-Rev servers, the server engines are all located in the directory cgi-bin.  The RevServer engine is located at /cgi-bin/ireviam-engine.  The latest LiveCode server engine is located at /cgi-bin/livecode-server.  Particular server engine versions can be found at /cgi-bin/livecode-server-<version_number>.

So, for example, your htaccess entries could take the following form:

AddHandler livecode-script .lc
Action livecode-script /cgi-bin/livecode-server
AddHandler livecode-463-script .lc463
Action livecode-463-script /cgi-bin/livecode-server-4.6.3
AddHandler livecode-8-script .lc
Action livecode-8-script /cgi-bin/livecode8/livecode-community-server
AddHandler irev-script .irev
Action irev-script /cgi-bin/ireviam-engine


Matthias Rebbe

This does not work with the server By default 7.1 is installed. Now i tried the above example to use the 8.1.3 engine. I´ve added the following lines
AddHandler livecode-813-script .lc .mr
Action livecode-813-script /cgi-bin/livecode-server-8.1.3

Is this method not supported anymore?

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.