installing livecode server via .htaccess
Posted: 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
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