Need help with CGI
Posted: Tue Jul 09, 2013 3:08 pm
I downloaded LiveCode Community Server 6.1.0 for Mac.
I unzipped it in my home directory: /Users/tacintosh/LiveCodeCommunityServer-6_1_0-Mac/
I edited ~/.cshrc (I use csh) so that it contains the line:
setenv PATH "$PATH":/Users/tacintosh/LiveCodeCommunityServer-6_1_0-Mac
Then I did:
tacintosh% source ~/.cshrc
and I created a file called myscript.lc which is:
<?lc
put "Hello World!" && the date && the time
?>
and I did:
tacintosh% livecode-community-server myscript.lc
And it gladly worked:
Hello World! 7/9/13 10:39 PM
Now I started to run livecode-community-server as CGI.
I tried to follow the instructions written at: How-do-I-install-LiveCode-Server-on-OS-X-with-Apache-
My tacintosh.conf looks like this:
[TacBook:/etc/apache2/users] tacintosh% cat tacintosh.conf
<Directory "/Users/tacintosh/Sites/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
AddHandler livecode-script .lc
Action livecode-script /livecode-cgi/livecode-community-server
</Directory>
<Directory "/Users/tacintosh/LiveCodeCommunityServer-6_1_0-Mac/">
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
ScriptAlias /livecode-cgi/livecode-community-server /Users/tacintosh/LiveCodeCommunityServer-6_1_0-Mac/livecode-community-server
(end of file)
I have already restarted Apache:
tacintosh% sudo apachectl restart
Now I tried to run the example on the page I mentioned above.
I saved test.lc in my Sites folder, and I typed this URL in Safari:
localhost/~tacintosh/test.lc
Then I got an error:
(beginning of page)
Forbidden
You don't have permission to access /livecode-cgi/livecode-community-server/~tacintosh/test.lc on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
(end of page)
What's wrong? Maybe my tacintosh.conf is written wrong. How should I correct it?
Thanks in advance,
- turbolaserguy
I unzipped it in my home directory: /Users/tacintosh/LiveCodeCommunityServer-6_1_0-Mac/
I edited ~/.cshrc (I use csh) so that it contains the line:
setenv PATH "$PATH":/Users/tacintosh/LiveCodeCommunityServer-6_1_0-Mac
Then I did:
tacintosh% source ~/.cshrc
and I created a file called myscript.lc which is:
<?lc
put "Hello World!" && the date && the time
?>
and I did:
tacintosh% livecode-community-server myscript.lc
And it gladly worked:
Hello World! 7/9/13 10:39 PM
Now I started to run livecode-community-server as CGI.
I tried to follow the instructions written at: How-do-I-install-LiveCode-Server-on-OS-X-with-Apache-
My tacintosh.conf looks like this:
[TacBook:/etc/apache2/users] tacintosh% cat tacintosh.conf
<Directory "/Users/tacintosh/Sites/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
AddHandler livecode-script .lc
Action livecode-script /livecode-cgi/livecode-community-server
</Directory>
<Directory "/Users/tacintosh/LiveCodeCommunityServer-6_1_0-Mac/">
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
ScriptAlias /livecode-cgi/livecode-community-server /Users/tacintosh/LiveCodeCommunityServer-6_1_0-Mac/livecode-community-server
(end of file)
I have already restarted Apache:
tacintosh% sudo apachectl restart
Now I tried to run the example on the page I mentioned above.
I saved test.lc in my Sites folder, and I typed this URL in Safari:
localhost/~tacintosh/test.lc
Then I got an error:
(beginning of page)
Forbidden
You don't have permission to access /livecode-cgi/livecode-community-server/~tacintosh/test.lc on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
(end of page)
What's wrong? Maybe my tacintosh.conf is written wrong. How should I correct it?
Thanks in advance,
- turbolaserguy