Need help with CGI
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 38
- Joined: Thu Jul 04, 2013 1:29 pm
Need help with CGI
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
Re: Need help with CGI
Have you checked the rights on your file test.lc ?
644
(and the rights on the directory /Users/tacintosh/Sites/ with 755 for instance)
644
(and the rights on the directory /Users/tacintosh/Sites/ with 755 for instance)
-
- Posts: 38
- Joined: Thu Jul 04, 2013 1:29 pm
Re: Need help with CGI
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.
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.
-
- Posts: 38
- Joined: Thu Jul 04, 2013 1:29 pm
Re: Need help with CGI
typo: 664 -> 644
-
- Posts: 38
- Joined: Thu Jul 04, 2013 1:29 pm
Re: Need help with CGI
To everyone: for the instructions I'm trying to follow, please Google "How-do-I-install-LiveCode-Server-on-OS-X-with-Apache-"
-
- Posts: 38
- Joined: Thu Jul 04, 2013 1:29 pm
Re: Need help with CGI
Anyone acquainted with httpd.conf? I despearately need help.
-
- Posts: 38
- Joined: Thu Jul 04, 2013 1:29 pm
Re: Need help with CGI
It worked!
It was a problem with directory permissions.
