installing livecode server via .htaccess

Are you using LiveCode to create server scripts or CGIs?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

installing livecode server via .htaccess

Post by Steve Denney » Thu Sep 01, 2011 7:37 am

Hi, I'm trying to install LiveCode-4_6_3-Server on a shared server.
Apologies beforehand, I don’t have a clue what I’m doing (well, much of one.)

The livecode pdf advises:

In order to set up LiveCode Server as a CGI with Apache, the following three modules must be enabled:
• mod_actions: http://httpd.apache.org/docs/2.0/mod/mod_actions.html
• mod_cgi: http://httpd.apache.org/docs/2.0/mod/mod_cgi.html
• mod_alias: http://httpd.apache.org/docs/2.0/mod/mod_alias.html

I haven’t checked this (& don’t know how to--other than contacting the provider). I’ve assumed for the moment that they are enabled.

Step1…
“Unzip the LiveCode Server archive into the cgi-bin folder.”

I’ve unzipped the entire linux installation in windows (.zip not tar) and copied it to the cgi-bin directory on the server.

Step 2
“Then, in the 'public_html' directory, create a .htaccess file along the following lines:

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

This file will tell Apache to map files with a .lc extension to livecode-script files, which should then get executed by the LiveCode Server CGI.”

Ok, so I did.
In truth, I couldn’t find a 'public_html' directory, so I put it in www. This crashed the site, possibly because there was another file named .htaccess in a directory named htdocs. Anyway, I deleted the .htaccess I’d created and edited the one that was there to include the above text. In full it now reads:

# Automatically added to force to php4 before server default changed to php5 on [072508]
AddType application/x-httpd-php .php
Action application/x-httpd-php /global-bin/php4.cgi
# livecode server script
Options ExecCGI
AddHandler livecode-script .lc
Action livecode-script /cgi-bin/livecode-server

Incidentally (probably not coincidentally) the site’s index.php now works again.

I then created a file named helloWorld.lc with the following contents:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head></head>
<body>
<?lc
put "<H1>hello world</H1>"
?>
</body>
</html>

I put this file in the htdocs directory, same dir as the site’s index.php homepage.
And now I get (when I try the .lc URL) i.e. http://ourDomain/helloWorldTest.lc
I get:

Forbidden You don't have permission to access /cgi-bin/livecode-server/helloWorldTest.lc on this server. Apache/1.3.42 Server

Can anyone help? As I said, I really don’t know what I’m doing.
Steve

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

Re: installing livecode server via .htaccess

Post by bangkok » Thu Sep 01, 2011 9:07 am

Have you set/checked the permisions of the file livecode-server ?

It should be 755.

Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

Re: installing livecode server via .htaccess

Post by Steve Denney » Thu Sep 01, 2011 11:04 pm

Thanks for replying Bangkok.

I can’t seem to do much at all with the server. There’s no command line, no $bash, or any sort of unix shell that I can find.

I’ve only a slight familiarity with linux. I’ve got a one-laptop-per-child computer here that runs something called sugar—it’s a cut down version of linux. Can’t see how that’s a help. I’m trying to do this (the set up) from a pc.

I did find a utility to change file permissions on the server. The only permissions were read, write, and execute. I have now changed all the permissions to execute (except for revzip.so which failed to parse).

Now when I run (enter the URL for) the .lc webpage I get a different message:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@domainName.net 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.
Apache/1.3.42 Server at domainName Port 80

I can’t find any server log. I’m about to contact the server tech support.
Steve

Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

Re: installing livecode server via .htaccess

Post by Steve Denney » Fri Sep 02, 2011 2:56 am

Hi,
I've spoken to the server tech staff.
They were helpful up to a point.
The three required modules are enabled.
I appear to have put everything in the right place.
The 755 permission suggested by Bangkok apparently equates to ‘Executable’ .
They told me how to access the error log.
Now it turns ugly:

livecode-server: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory

--deleted rant--

I’m thinking this is not a go-er. They are Melbourne IT, one of the big name Australian providers. They have many thousands of customers. They as much as told me to use php.

Php works.

Maybe there’s still some way for me save face here… me, the guy that got my employer to purchase the web platform, who then suggested its shortcomings could be overcome by getting the server platform.

If anyone knows of a solution (that doesn’t involve either a time machine or hacking Melbourne IT) please, I’m begging you.
Steve

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

Re: installing livecode server via .htaccess

Post by bangkok » Fri Sep 02, 2011 6:49 am

Have you tried to do a "ldd" on the livecodeserver file ?

This command will show if a library is missing.

It was a big problem with the beta release of LiveCode Server.

If your webhosting company is unable to install a missing library I would suggest you... to change.

What about a VPS ? That would solve all your problems. I use 1 with a Linux Debian 5 and with the new version of LiveCode Server, no more installation problems.

Or, it seems that there are "shared" hosting services around... that can support LiveCode Server (look in the forum).

Steve Denney
Posts: 101
Joined: Wed Dec 22, 2010 8:17 pm

Re: installing livecode server via .htaccess

Post by Steve Denney » Fri Sep 02, 2011 11:31 pm

Thanks Bangkok,

I remember these sorts of difficulties from wrestling with olpc linux.

I suspect the library is there (in the server’s OS), and it’s a path or version issue.

In fact, here’s a suggested solution:

ln -s /usr/local/lib/libgcc_s.so.1 /usr/lib/libgcc_s.so.1

Melbourne IT is a shared server. I don’t have access to the operating system.
And even if I can convince the tech staff to help in this case, I need our products to work on other people’s web sites—meaning, I want to build livecode web pages and put them on other people’s servers.

And they have to work.
This apparently isn’t the case.

If it wasn’t a shared server, i.e. if it were a business or educational institution’s server, then I’d still have the same problem. One reason I abandoned the web platform was because institution IT staff were reluctant to allow users to install a new ‘unknown’ plugin (weblets).

Now I’m going to ask them to solve a Linux problem?

(I’d laugh but it’s not funny).
Steve

Post Reply

Return to “CGIs and the Server”