POLL: LiveCode Server deployment

Are you using LiveCode to create server scripts or CGIs?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

How do you use LiveCode Server?

I haven't used it yet but intend to.
29
30%
I run it on a VPS or dedicated server.
29
30%
I run it on a shared hosting service.
31
32%
I have no interest in LiveCode Server.
8
8%
 
Total votes: 97

hliljegren
Posts: 108
Joined: Sun Aug 23, 2009 7:48 am
Contact:

Re: POLL: LiveCode Server deployment

Post by hliljegren » Fri Jan 24, 2020 3:03 pm

B: I use it on a webserver at our university. At the moment there are mainly small utilities for getting account credentials, getting results, etc. But in the near future, I will probably use it to build more tools that integrate several of our other systems. I usually create a tool in the LiveCode IDE first, then move it to the server and add a web GUI instead.
___________________________________
MacBook Pro, 15" 2.6GHz i7 Mac OS X 10.10.4
iMac 27", 3.2 GHz Quad i7, Mac OS 10.10.4
LiveCode 7.0.6 or 8.0dp4

TorstenHolmer
Posts: 30
Joined: Mon Oct 28, 2013 1:23 pm
Location: Dresden, Germany

Re: POLL: LiveCode Server deployment

Post by TorstenHolmer » Sat Jan 25, 2020 9:17 pm

C: I have an account at www.hostm.com which is one of the very few hosting companies running Livecode server.

Up to now I'm using it to create some scripts which work as an API for some mobile apps for scientific projects.

I really like that Ii can be creative with Livecode on all platforms and devices and don't have to implement functions in different languages just to be able to use them in multiple usage scenarios.

I think especially for some kind of API functions Livecode server can be really productive due to its simplicity and development speed.

Cheers,
Torsten

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8474
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: POLL: LiveCode Server deployment

Post by FourthWorld » Sun Jan 26, 2020 2:21 am

Thank you for chiming in, Torsten.
TorstenHolmer wrote:
Sat Jan 25, 2020 9:17 pm
I really like that Ii can be creative with Livecode on all platforms and devices and don't have to implement functions in different languages just to be able to use them in multiple usage scenarios.
^ this!

That's my attraction. LC covers as many platforms as JavaScript, but more sanely. :)
I think especially for some kind of API functions Livecode server can be really productive due to its simplicity and development speed.
Good suggestion. Thanks.
Richard Gaskin
LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 362
Joined: Tue Apr 10, 2012 9:18 am

Re: POLL: LiveCode Server deployment

Post by ghettocottage » Mon Jan 27, 2020 3:04 am

Like @TorstenHolmer I have used LCS for writing API's (amongst other things) and I find it especially quick and easy to work with.

This past month I have been working on a Weather Station running on a Raspberry Pi out in a field. Rather than doing much on the rpi, I am just sending the bare-bones data to a LC server via my custom little API post and have my server do all of the work with calculating, putting things into a database, and producing a webpage with weather statistics.

Compared to working with PHP, I find Livecode to be enjoyable rather than stressful.

Having said that, I am a web-developer and have been working with Linux and VPS's for the last few years on a regular basis so basic setup, configuration and securing are second nature to me now. I can understand how those things can be major hurdles for someone just delving into that realm.

fritzdekatt
Posts: 55
Joined: Fri Feb 09, 2018 2:28 am

Re: POLL: LiveCode Server deployment

Post by fritzdekatt » Thu Feb 25, 2021 8:27 pm

I'd like to be using LC server right now, except I can't get it to work.
I'm using USBWebServer on Windows 10 Pro 64. I tried setup via .htaccess and http.conf in all the variations I could read about.
I have an old commercial version running on my Mac (5.5) but I've set up a Community version (9.6) on Windows. In desperation, I tried to download a Windows version of my commercial server but the user and password don't seem to work anymore so I was spared the effort. I read somewhere that the version might matter.
I am wondering if the paths of USBWebServer might make a difference. It apparently embeds path variables in its http.conf, derived from its .ini files. I might be better off just downloading XAMPP, but I had a lot of trouble with that too on my WIndows 7 desktop, in terms of LC Server. I've set up XAMPP itself pretty close to a hundred times so I get the general idea.
I'm thinking there might be a newer source of information about LC Server setup somewhere, but I don't see it and I certainly looked. I just found an old pdf dealing with my old commercial server and it was much more detailed than the more general pdf that comes out now with the newer versions, and I tried its suggestions, but I don't know how much configuration has changed in the intervening time.
I will probably have to try XAMPP on my desktop (Win Pro 7). In the meantime, if anybody has worked out these difficulties and wants to give me a clue, please don't be shy.

matthiasr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 121
Joined: Sat Apr 08, 2006 7:55 am
Location: Lübbecke, Germany
Contact:

Re: POLL: LiveCode Server deployment

Post by matthiasr » Thu Feb 25, 2021 9:12 pm

Fritzdekatt,

i just tried here USBWebServer with Win10 64 bit and the 64bit LC Server Community version without a problem.

These are my steps.

1. In folder "Root" create a folder cgi-bin
2. download and extract Livecode server and copy livecode-community-server.exe and the 2 folders externals and drivers into the cgi-bin folder.
3. creating a .htaccess file is not possible under Windows. So create a file htaccess.txt in the folder "Root", open it in an editor and add the following text to it

Code: Select all

Options +ExecCGI
Action livecode-script /cgi-bin/livecode-community-server.exe
<FilesMatch ".+\.lc$">
SetHandler livecode-script
</FilesMatch>

4. open the file httpd.conf in folder "Settings" in an editor and add the following line at the end of that file

Code: Select all

AccessFileName htaccess.txt
5. create a script file e.g. index.lc in the folder "Root", open it in an editor and add some LC Script to it. e.g

Code: Select all

<?lc
put the version
?>
6. open the file in your browser

Code: Select all

http://localhost:8080/index.lc
If all is fine, then you should see the version number of the installed Livecode Server.


HTH

Matthias

sphere
Posts: 1117
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: POLL: LiveCode Server deployment

Post by sphere » Fri Feb 26, 2021 11:28 am

Although there is a long standing bug report to include the correct description notes with the server download, it is still not solved as of 2019. Seems to me a very simple thing to solve: https://quality.livecode.com/show_bug.cgi?id=22405
The correct notes are with version 6 and was also shared here on the forum by Ralph the fantastic inventor who created RevIgniter.
viewtopic.php?f=15&t=33199&p=184089&hilit=notes#p184075

fritzdekatt
Posts: 55
Joined: Fri Feb 09, 2018 2:28 am

Re: POLL: LiveCode Server deployment

Post by fritzdekatt » Sat Feb 27, 2021 12:33 am

Matthias
Thanks so much for the response. I've literally never seen some of this code before so it looks promising and obviously has the advantage of having been tested. I cut and paste to avoid the possibility of error, restarted Apache many times and yet still no luck.

Unlike with previous attempts, I do get a straight text readout of the contents of the file instead of a "file not found" so that's a little different anyway.
Since my post, I downloaded XAMPP (which I've set up for PHP many times) and implemented the stated mods in the documentation (at LC and the Fandom Wiki and the old version 6 server docs alluded to by our friend sphere). I am clearly doing something very wrong, but I have no idea what.

So my thought that it might be the portable pathing variables and the dynamic http.conf creation in USBWebServer is clearly wrong. I have now failed utterly on two Apache platforms. Sometime over the weekend, I'm going to try this with my original commercial version 5.5 LC server. I got that to work on the Mac but not yet on pc. I don't know how that works license-wise, but I'm not using the Mac and neither of these laptops are production systems. I have no idea if 5.5 is really suited for Win 10 64, but I'll give it a shot.

I tried your solution with the previous http.conf changes as suggested by the docs, and without. I have previously tried moving the cgi-bin folder around as that worked for me on the Mac. I would have some concerns about actually deploying with cgi-bin in the root, but since it doesn't work anyway that's kind of academic.

You obviously know what you're doing (that Filesmatch directive was something new to me!), and I deeply appreciate you taking the time.
fritz
matthiasr wrote:
Thu Feb 25, 2021 9:12 pm
Fritzdekatt,

i just tried here USBWebServer with Win10 64 bit and the 64bit LC Server Community version without a problem...
(detailed instructions from Matthias' last post deleted for brevity)

Matthias

fritzdekatt
Posts: 55
Joined: Fri Feb 09, 2018 2:28 am

Re: POLL: LiveCode Server deployment

Post by fritzdekatt » Sat Feb 27, 2021 12:41 am

I went back to my version 5.5 LC commercial server and found those version 6 notes you mentioned.
I thought it was me. All the versions after that were for the IDE. That made no sense but I figured it was an "inside" thing.
There are some detailed setup instructions in those notes which undoubtedly will prove useful when I finally figure out what I'm doing wrong. Regardless, it does seem keeping the notes current would be an important factor in adapting LC server among the general geek public, since all the nodeheads and php nerds are not necessarily flocking to it in droves so far.

Thanks for your comment. I was really wondering about this.
fritz
sphere wrote:
Fri Feb 26, 2021 11:28 am
Although there is a long standing bug report to include the correct description notes with the server download, it is still not solved as of 2019. Seems to me a very simple thing to solve: https://quality.livecode.com/show_bug.cgi?id=22405
The correct notes are with version 6 and was also shared here on the forum by Ralph the fantastic inventor who created RevIgniter.
viewtopic.php?f=15&t=33199&p=184089&hilit=notes#p184075

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8474
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: POLL: LiveCode Server deployment

Post by FourthWorld » Sat Feb 27, 2021 2:28 am

If you need help the Lessons are generally kept current:
https://lessons.livecode.com/m/4070

There's an open question of whether it's useful to include Release Notes with the download, since it most common use case for Server is a headless Linux server where that PDF just gets tossed anyway.

The release notes are included in the IDE and also available as a download on the Downloads page - I often skim that version while waiting for my downloads when updating.

It may be most helpful to learn more about the specifics of where the Release Notes info has been useful.

Installing is a common need, and the Lessons handle that well (better than trying to read a PDF on a server <g>). LC Server runs as a generic CGI, and the CGI spec doesn't change, so if changes are still need in the installation Lessons we can accommodate those well and we won't likely need to change them often.

New features, though, are always go to know about. It's not often we get new LC features that are helpful in a CGI environment, but general language things like enhancements to array handling can be useful, and are in the Release Notes.

If you've encountered specific issues installing or upgrading LC Server please let us know, esp. where they reflect changes between versions. That should be rare, given how CGI works, but there's always the chance the Lessons have overlooked some detail that can make it easier dealing with the various server configs hosts offer.
Richard Gaskin
LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

sphere
Posts: 1117
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: POLL: LiveCode Server deployment

Post by sphere » Sat Feb 27, 2021 2:42 pm

It's not the Release notes what is needed with the Server zip download, it's the Description notes which exactly point out what you have to do to install LC server and have it working correctly.

sphere
Posts: 1117
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: POLL: LiveCode Server deployment

Post by sphere » Sat Feb 27, 2021 2:51 pm

This is copied from a working XAMPP on windows which I carry also on USB, copy it into httpd.conf.
Open XAMPP, click on config and open httpd.conf with notepad+ or whatever.
note that the part Documentroot and <Directory is already in it, but i copied it here so you can see where I added the LC part.
It also shows in which folder I copied the LC server, it's on windows so its extension is exe.
Save it --> Start or restart apache.
Hope this helps.

Code: Select all

DocumentRoot "D:/server/xampp/htdocs"
<Directory "D:/server/xampp/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks Includes ExecCGI

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
	</Directory>
 #####################################livecode###################
<Directory "d:/server/xampp/htdocs">
Options 
    Options ExecCGI MultiViews Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    AddHandler livecode-script .lc
    Action livecode-script /cgi-bin/livecode-community-server.exe
</Directory>
##########################livecode#################
<Directory  "d:/server/xampp/cgi-bin">
   Options ExecCGI
AllowOverride All
Require all granted
 </Directory>
 ScriptAlias /cgi-bin/livecode-community-server.exe "d:/server/xampp/cgi-bin/livecode-community-server.exe"
 ########################################################

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8474
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: POLL: LiveCode Server deployment

Post by FourthWorld » Sat Feb 27, 2021 5:44 pm

sphere wrote:
Sat Feb 27, 2021 2:42 pm
It's not the Release notes what is needed with the Server zip download, it's the Description notes which exactly point out what you have to do to install LC server and have it working correctly.
Installation instructions are currently provided in the Lessons .

Apparently that's not well known, so perhaps what we need is to include a note in the package with that URL. Or maybe better, put the link next to the link people use to download the package.
Richard Gaskin
LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8474
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: POLL: LiveCode Server deployment

Post by FourthWorld » Sat Feb 27, 2021 6:17 pm

fritzdekatt wrote:
Sat Feb 27, 2021 12:41 am
I went back to my version 5.5 LC commercial server...
Version 5 is nearly a decade old, missing out on compatibility enhancements needed for modern OS versions, and several hundred bug fixes. It's possible that some of the issues you're encountering may be related to the age of the executable.

I would recommend using the latest Stable release, currently v9.6.1.

Current and maintained installation guidance is included in the Lessons:
https://lessons.livecode.com/m/4070

Any guidance needed for edge cases not handled in the Lessons, like running XAMP from a thumb drive, can be handled here in these forums, or the forums for the specific server package (look for threads about setting up CGI).

If you use a current supported LC version we can usually rule out engine compatibility issues, and the remainder almost always boil down to paths and permissions. We can likely help sort those out and get you running before the weekend is out.
Richard Gaskin
LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

sphere
Posts: 1117
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: POLL: LiveCode Server deployment

Post by sphere » Sat Feb 27, 2021 8:31 pm

FourthWorld wrote:
Sat Feb 27, 2021 5:44 pm
Installation instructions are currently provided in the Lessons .

Apparently that's not well known, so perhaps what we need is to include a note in the package with that URL. Or maybe better, put the link next to the link people use to download the package.
Yes, also a good idea

Post Reply

Return to “CGIs and the Server”