Need help with CGI

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
turbolaserguy
Posts: 38
Joined: Thu Jul 04, 2013 1:29 pm

Need help with CGI

Post by turbolaserguy » 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

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

Re: Need help with CGI

Post by bangkok » Tue Jul 09, 2013 3:16 pm

Have you checked the rights on your file test.lc ?

644

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

turbolaserguy
Posts: 38
Joined: Thu Jul 04, 2013 1:29 pm

Re: Need help with CGI

Post by turbolaserguy » Tue Jul 09, 2013 3:21 pm

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.

turbolaserguy
Posts: 38
Joined: Thu Jul 04, 2013 1:29 pm

Re: Need help with CGI

Post by turbolaserguy » Tue Jul 09, 2013 3:22 pm

typo: 664 -> 644

turbolaserguy
Posts: 38
Joined: Thu Jul 04, 2013 1:29 pm

Re: Need help with CGI

Post by turbolaserguy » Tue Jul 09, 2013 3:28 pm

To everyone: for the instructions I'm trying to follow, please Google "How-do-I-install-LiveCode-Server-on-OS-X-with-Apache-"

turbolaserguy
Posts: 38
Joined: Thu Jul 04, 2013 1:29 pm

Re: Need help with CGI

Post by turbolaserguy » Fri Jul 12, 2013 11:15 pm

Anyone acquainted with httpd.conf? I despearately need help.

turbolaserguy
Posts: 38
Joined: Thu Jul 04, 2013 1:29 pm

Re: Need help with CGI

Post by turbolaserguy » Wed Jul 17, 2013 5:26 pm

It worked! :) It was a problem with directory permissions.

Post Reply