Page 1 of 1

Need help with CGI

Posted: Tue Jul 09, 2013 3:08 pm
by turbolaserguy
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

Re: Need help with CGI

Posted: Tue Jul 09, 2013 3:16 pm
by bangkok
Have you checked the rights on your file test.lc ?

644

(and the rights on the directory /Users/tacintosh/Sites/ with 755 for instance)

Re: Need help with CGI

Posted: Tue Jul 09, 2013 3:21 pm
by turbolaserguy
bangkok,
Thank you for replying.
I did this:
% chmod 664 test.lc
and reloaded the page, but I got this message:

"You don't have permission to access /livecode-cgi/livecode-community-server/~tacintosh/test.lc on this server."


The path /livecode-cgi/livecode-community-server/~tacintosh/test.lc does not exist to start with.

Re: Need help with CGI

Posted: Tue Jul 09, 2013 3:22 pm
by turbolaserguy
typo: 664 -> 644

Re: Need help with CGI

Posted: Tue Jul 09, 2013 3:28 pm
by turbolaserguy
To everyone: for the instructions I'm trying to follow, please Google "How-do-I-install-LiveCode-Server-on-OS-X-with-Apache-"

Re: Need help with CGI

Posted: Fri Jul 12, 2013 11:15 pm
by turbolaserguy
Anyone acquainted with httpd.conf? I despearately need help.

Re: Need help with CGI

Posted: Wed Jul 17, 2013 5:26 pm
by turbolaserguy
It worked! :) It was a problem with directory permissions.