How can I use tsNet with LiveCode Server in on-rev

In this lesson, we will show how to use tsNet with LiveCode Server in on-rev server. We will use the LiveCode Business Server 64bit engine, but the steps are similar if you have an Indy license.

Step 1 - Install the desired version (and edition) of the LiveCode Server

In public_html/cgi-bin/ , create a folder livecode-server-9.6.0. In this folder, put all the contents of LiveCode Business Server 9.6.0 Linux 64 bit, as downloaded from your LC account.

Note: In on-rev, I was not able to upload a folder. So, instead of uploading the folders externals and drivers , I created them in public_html/cgi-bin/livecode-server-9.6.0/, and just uploaded their contents:


Step 2 - Locate the correct version of the tsNet external in your desktop LiveCode install

I am on MacOS, so the tsNet binaries will be located in /Applications/LiveCode Business directory:

Also, my on-rev server is running Linux 64 bit, thus the tsNet binary I need is the one.

Step 3 - Place the tsNet binary in the externals folder of your LiveCode Server

In the externals folder, upload the tsNet binary for 64bit Linux, as found in the LC 9.6.0 desktop bundle:

Step 4 - Edit your .htaccess file

Now you need to edit your .htaccess file, to associate the .lc extension with livecode server 9.6.0. My .htaccess file looks like this:

# php -- BEGIN cPanel-generated handler, do not edit
# Set the "ea-php70" package as the default "PHP" programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php70 .php .php7 .phtml

# php -- END cPanel-generated handler, do not edit
suPHP_ConfigPath /home/panostest/public_html/
<Files php.ini>
order allow,deny
deny from all

Options +ExecCGI

Action custom-814-livecode /cgi-bin/livecode-server-814/livecode-server
Action custom-960-livecode /cgi-bin/livecode-server-9.6.0/livecode-server
Action custom-2-livecode /cgi-bin/livecode-server-9.0.0/livecode-server

## LC 8.1.4 commercial
<FilesMatch ".+\.lc8$">
SetHandler custom-814-livecode

## LC 9.6.0 commercial
<FilesMatch ".+\.lc$">
SetHandler custom-960-livecode

## LC 9.0.0 commercial
<FilesMatch ".+\.lc9$">
SetHandler custom-2-livecode

This also links .lc8 extension with LiveCode Server 8.1.4, and .lc9 extension with LiveCode Server 9.0.0 - but you do not need them, so you can omit these lines.

Step 5 - Check if this works

I have put the following .lc file in public_html/



local tOutput 
put the version into tOutput
put return & tsNetVersion() after tOutput

put tOutput


Add your comment

E-Mail me when someone replies to this comment