Installing Livecode Server on Debian

Are you using LiveCode to create server scripts or CGIs?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
elijahlowGA1b54
Posts: 10
Joined: Mon Dec 05, 2011 5:33 pm

Installing Livecode Server on Debian

Post by elijahlowGA1b54 » Tue Nov 13, 2012 1:04 am

I tried installing Livecode server on a debian server and got this error when I tried to run the hello world lc example:

From Apache error log:
[Mon Nov 12 23:45:10 2012] [error] [client 66.168.28.12] (2)No such file or directory: exec of '/usr/lib/cgi-bin/livecode-server' failed
[Mon Nov 12 23:45:10 2012] [error] [client 66.168.28.12] Premature end of script headers: livecode-server

I installed livecode-server into /usr/lib/cgi-bin/ and chmod 755
I edited the apache conf and added the two lines

What should I do?

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

Re: Installing Livecode Server on Debian

Post by FourthWorld » Tue Nov 13, 2012 1:17 am

The stock info in RunRev's setup guide is incorrect on many Linux systems. Please post the contents of your /etc/apache2/sites-enabled/default file and we'll see what needs to be adjusted.
Richard Gaskin
LiveCode Community Liaison

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

elijahlowGA1b54
Posts: 10
Joined: Mon Dec 05, 2011 5:33 pm

Re: Installing Livecode Server on Debian

Post by elijahlowGA1b54 » Tue Nov 13, 2012 2:20 am

sites-enabled :

---------------------------
<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
AddHandler livecode-script .lc
Action livecode-script /cgi-bin/livecode-server
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1682
Joined: Sat Feb 28, 2009 11:49 pm

Re: Installing Livecode Server on Debian

Post by sturgis » Tue Nov 13, 2012 2:53 am

Think i'd change it as follows, then, with the error you were getting i'd make sure livecode-server was in the root of cgi-bin, re-check permissions, check ownership to make sure the server has the right to execute (I know you said it was 755, but doesn't hurt to double check) might also confirm that the enclosing folder is readable by apache too (cgi-bin)

Adjust as necessary and then restart apache.
elijahlowGA1b54 wrote:sites-enabled :

---------------------------
<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /var/www
<Directory />
Options FollowSymLinks ExecCGI
AllowOverride None
AddHandler livecode-script .lc
Action livecode-script /cgi-bin/livecode-server

</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>

elijahlowGA1b54
Posts: 10
Joined: Mon Dec 05, 2011 5:33 pm

Re: Installing Livecode Server on Debian

Post by elijahlowGA1b54 » Tue Nov 13, 2012 3:05 am

The problem still exist. I don't seem to be able to run it as command line either. It gives me this error:

/usr/lib/cgi-bin$ livecode-server myscript.lc
Sorry, command-not-found has crashed! Please file a bug report at:
https://bugs.launchpad.net/command-not-found/+filebug
Please include the following information with the report:

command-not-found version: 0.2.44

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1682
Joined: Sat Feb 28, 2009 11:49 pm

Re: Installing Livecode Server on Debian

Post by sturgis » Tue Nov 13, 2012 3:16 am

If cgi-bin is not in the path then when running from the command line you need to do it like this

./livecode-server myscript.lc

tells the shell to use the current directory as the path to livecode-server


command not found has crashed though is a bit weird.
The error itself points to this bug. https://bugs.launchpad.net/ubuntu/+sour ... bug/995378 and probably appears on most every mistyped or not found command. the ./livecode-server trick should avoid the bug. (I think there is an update that fixes the command not found stuff, not sure though)

elijahlowGA1b54
Posts: 10
Joined: Mon Dec 05, 2011 5:33 pm

Re: Installing Livecode Server on Debian

Post by elijahlowGA1b54 » Tue Nov 13, 2012 4:30 am

/usr/lib/cgi-bin$ ./livecode-server myscript.lc
-bash: ./livecode-server: No such file or directory

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1682
Joined: Sat Feb 28, 2009 11:49 pm

Re: Installing Livecode Server on Debian

Post by sturgis » Tue Nov 13, 2012 8:47 am

Ok, just remembered something. Well ok 2 things. First, the livecode-server file is actually in /usr/lib/cgi-bin yes? (I'm assuming it is) THen the next question is this.. Is your debian install 64 bit? If it is, and your livecode-server is really there (as well as its 2 support folders) then to get it to run you will need to install the 32 bit library files. livecode-server is a 32 bit app and you will get the errors you are seeing if its installed on a 64 bit app unless you install the 32 bit support libraries. I believe the package that needs to be installed is ia32 or something similar.

elijahlowGA1b54
Posts: 10
Joined: Mon Dec 05, 2011 5:33 pm

Re: Installing Livecode Server on Debian

Post by elijahlowGA1b54 » Tue Nov 13, 2012 12:31 pm

Thanks, that fixed it. It is working now. The command to install the lib is:
sudo apt-get install ia32-libs

Post Reply

Return to “CGIs and the Server”