Livecode Server (how to install, test, and manage)

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

sebascode
Posts: 1
Joined: Sat Oct 19, 2013 5:58 pm

Livecode Server (how to install, test, and manage)

Post by sebascode » Sun Oct 20, 2013 4:39 am

Hi
I already installed Livecode on my pc, very easy to install, easy to use, looks great 8) , but when I started making an app that reads and stores info on a database I had to instal "Livecode Server" on a Server, my server has LAMP (Linux Apache PHP MySQL). I downloaded Livecode Server 6_5_0 from Livecode website, and followed the instructions to run the "hello world" in command line mode (not CGI) as described on said website.

but it doesn't work, I couldn't find any other documentation on posible errors and solutions on this step, and I'm also not sure if Livecode Server is 100% free or if I have to pay something in order fot it to work, also I would like to know if I can use JSON and web services to pass data between my app and the Server.

-Long story short, I would really apreciate if someone knows where can I fin info or can tell me about:

1) is Livecode Server 100% free? can I just go to Livecode website, download it and use it?

2) what may be the reason it doesn't work when I try to run the "hello world" from command line? (assuming that Linux Apache PHP and MySQL are correctly configured)

3) when I finally install correctly Livecode Server, can I use JSON and web services to pass the data between my app and the server right away, or I would need to install a plug-in (which plug-in)?

Thanks a lot for your help, I'm really looking forward to learn Livecode, and really apreciate your help on this, as it is not available anywhere else :mrgreen:

boysky76
Posts: 48
Joined: Tue Aug 13, 2013 9:49 am

Re: Livecode Server (how to install, test, and manage)

Post by boysky76 » Sun Dec 01, 2013 9:54 pm

I also have the same problem, I do not understand how to configure it, it's a shared server, where I already have a website created in wordpress.
Can anyone give some indication

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Livecode Server (how to install, test, and manage)

Post by bangkok » Sun Dec 01, 2013 10:56 pm

OK a few tips.

-peruse the forum. You'll find several threads on how to install LiveCode Server

-on the web too

-share with us the the config file of Apache, and config file of your website, so we can have a look

-check the permissions for all files in the livecode server directory

-yes LiveCode Server Community is free
http://downloads.livecode.com/livecode/server/6_5_0/

-of course you can JSON, XMLRPC (in raw data, with POST) all what you want with LiveCode Desktop ! You're able to create and send any queries, with any header to any http server.
No need any "plug in".

For JSON and XML, a few libraries are available.

Last but not least : LiveCode Server rocks. :D

******************
Here is my Apache web config file (linode VPS)

Code: Select all

# domain: example.com
# public: /home/example_user/public/example.com/

<VirtualHost *:80>
  # Admin email, Server Name (domain name), and any aliases
  ServerAdmin webmaster@example.com
  ServerName  www.example.com
  ServerAlias example.com

  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.lc index.php
  DocumentRoot /home/XX/public/XX.com

<Directory /home/XX/public/XX.com/>
AllowOverride All
    Options  MultiViews
    Order allow,deny
    allow from all
    AddHandler livecode-script .lc
    Action livecode-script /cgi-bin/livecode-server
 </Directory>

ScriptAlias /cgi-bin/ /home/XX/public/cgi-bin/

<Directory "/home/XX/public/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>


  # Log file locations
  LogLevel warn
  ErrorLog  /home/XX/public/XX.com/error.log
  CustomLog /home/XX/public/XX.com/access.log combined
</VirtualHost>

****************
-All livecode server files and sub directories are copied in :

/home/XX/public/cgi-bin/

-Permissions are set to 755

-index.lc is copied in /home/XX/public/XX.com/

And voila. That's all.

boysky76
Posts: 48
Joined: Tue Aug 13, 2013 9:49 am

Re: Livecode Server (how to install, test, and manage)

Post by boysky76 » Sun Dec 01, 2013 11:20 pm

thanks for the reply, I would like to configure it through. htaccess, I downloaded and installed "http://downloads.livecode.com/livecode/server/6_5_0/" in html_public / cgi-bin directory with 755 permissions. and then I created a folder with the file filename.lc, and the .htaccess file with this configuration:

Options ExecCGI
     LiveCode-script AddHandler. Lc
     LiveCode Action-script / cgi-bin/livecode-server

but does't work.

where is the error :/

500 Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@pcassistant.eu and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Livecode Server (how to install, test, and manage)

Post by bangkok » Mon Dec 02, 2013 10:52 am

OK. 5 things :

-Following
http://lessons.runrev.com/s/3527/m/4070 ... a-htaccess

Use in .htaccess instead :

Code: Select all

    Options ExecCGI
    AddHandler livecode-script .lc
    Action livecode-script /cgi-bin/livecode-server
-what is the content of your filename.lc file ?

-what is your hosting company ? Or do you have full control of your server ?

-most of the times , problems come from file tree
Example : in /cgi-bin/livecode-server, is the file "livecode-server" at this level, or in a sub directory named "livecode-server" ? Where is located the /cgi-bin directory ?

-how did you upload the livecode server files to your server ? FTP ? Did you use the "binary" mode of transfert, instead of ASCII mode ?

boysky76
Posts: 48
Joined: Tue Aug 13, 2013 9:49 am

Re: Livecode Server (how to install, test, and manage)

Post by boysky76 » Mon Dec 02, 2013 11:13 am

Hi Bangkok,

thank's for your reply..

I followed exactly the lesson:
.....-how-do-i-install-livecode-server-with-apache-via-htaccess

inserting livecode.server under /cgi-bin folder uploading through ftp

I created a test folder under html_public folder, and inside the folder I entered .htaccess file with this configuration:
  Options ExecCGI
  LiveCode-script AddHandler. Lc
  LiveCode Action-script / cgi-bin/livecode-server

and the file test.lc in test folder too

if I call my file at this address http://pcassistant.eu/test/test.lc returns internal server error 500.

the hosting is dominiok.net

I installed the wordpress in this domain, but I have other php scripts loaded and I never had any problems.

:?: where is my mistake I'm going crazy :(:(

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Livecode Server (how to install, test, and manage)

Post by bangkok » Mon Dec 02, 2013 12:11 pm

Please answer the questions :

-Did you use the "binary" mode for FTP transfert, instead of ASCII mode ?

-what is the content of your "test.lc" file (it was "filename.lc" before ?)

boysky76
Posts: 48
Joined: Tue Aug 13, 2013 9:49 am

Re: Livecode Server (how to install, test, and manage)

Post by boysky76 » Mon Dec 02, 2013 1:08 pm

1- the ftp trasfer is setting in ascii mode

2-has always been test.lc and the content is:

<html>

<head>
     <title> My LiveCode Server Test Page </ title>
</ head>

<body>
      <h1> My LiveCode Server Test Page </ h1>
<? lc
      put "<p> Hello World! LiveCode Server from </ p>"
      put "<p> The date is" && the dates & "</ p>"
?>
</ body>

</ html>

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Livecode Server (how to install, test, and manage)

Post by bangkok » Mon Dec 02, 2013 1:13 pm

boysky76 wrote:1- the ftp trasfer is setting in ascii mode
Bingo. :D

LiveCode Server files are BINARY.

So you have to :

-delete the files on your server
-setup your FTP client (with binary mode)
-and upload again (and dont forget to set permissions 755 again, on all files)

boysky76
Posts: 48
Joined: Tue Aug 13, 2013 9:49 am

Re: Livecode Server (how to install, test, and manage)

Post by boysky76 » Mon Dec 02, 2013 1:58 pm

ok, thanks

I did everything as said and nothing change.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Livecode Server (how to install, test, and manage)

Post by FourthWorld » Mon Dec 02, 2013 3:26 pm

You may want to double-check that the .htaccess file you write is using Unix line endings (ASCII 10), in order for Apache to be able to parse it correctly.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

boysky76
Posts: 48
Joined: Tue Aug 13, 2013 9:49 am

Re: Livecode Server (how to install, test, and manage)

Post by boysky76 » Mon Dec 02, 2013 3:50 pm

you can post an example. htaccess file, please
in runrev in the lesson, that you also have posted before, said create a file .htaccess with this content.

Options ExecCGI
 LiveCode-script AddHandler. lc
 LiveCode Action-script / cgi-bin/livecode-server

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Livecode Server (how to install, test, and manage)

Post by bangkok » Mon Dec 02, 2013 4:25 pm

OK. I see another possible error : your test.lc file is wrong.

Code: Select all

     put "<p> The date is" && the dates & "</ p>"
the dates = wrong
and there is only one quote.

Try a test.lc with something very simple :

Code: Select all

<?lc
put the date
?>
If no change, then I would say that you have 2 more sources of problem :

-you have a problem with the file tree : try to move "around" your files. Delete the "test" directory, put your test.lc file at the first level in public_html.
Same for cgi-bin directory... try to put all LiveCode Server files directly in public_html, and change the .htaccess file accordingly.
etc.

-there is something wrong with your hosting service.

boysky76
Posts: 48
Joined: Tue Aug 13, 2013 9:49 am

Re: Livecode Server (how to install, test, and manage)

Post by boysky76 » Tue Dec 03, 2013 9:26 am

I still can not run, I asked about the hosting service and they gave me the correct path to put in. htaccess file but still does not work.

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Livecode Server (how to install, test, and manage)

Post by bangkok » Tue Dec 03, 2013 1:26 pm

Sorry, we can't help you.

It must be something really tiny, a small detail you forgot.

It's frustrating.

The only advice I can still give you is :
-to restart again everything, step by step
-playing on "variability" and move around things (file tree, files name, directories etc.)

... eventually, you'll find the right combination.

Good luck.

Post Reply