|
|
Installing CGI
|
|
|
|
Mac Elite
Join Date: Jan 2004
Location: Berkeley, CA
Status:
Offline
|
|
I know I shouldn't do this, but since the UNIX forum is so empty and I still need help with installing CGI, I'm going to link to my post in the UNIX forum:
http://forums.macnn.com/showthread.php?t=299635
My current problem is that I don't have permission to view http://localhost/cgi-bin/.
If the post could just be moved to this forum and this one deleted, that'd be great. If not, I apologize for the rule violation.
|
"Give me a lever long enough and a fulcrum on which to place it, and I shall move the world." -Archimedes
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jan 2004
Location: Berkeley, CA
Status:
Offline
|
|
|
"Give me a lever long enough and a fulcrum on which to place it, and I shall move the world." -Archimedes
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Nov 2004
Location: Stockholm, Sweden
Status:
Offline
|
|
Open a Terminal window and do the following:
1. type: cd /Library/WebServer/CGI-Executables/
2. type: vim hello.pl
3. press i to enter insert mode
4. type: #!/usr/bin/perl
5. type: print"Content-type:text/html\n\n";
6. type: print "Hello Cleveland! \n";
7. press `esc` to exit insert mode
8. type :wq to write & quit
9. type: chmod 755 hello.pl
10. go to http://localhost/cgi-bin/hello.pl
If you don't get a 500 error, you'll see "Hello Cleveland!" and you'll be on your way to ruling the universe. If you do, then you need to configure your httpd.conf.
Oh, you don't "install CGI". You should probably do some homework as to what CGI stands for and how the basic process I talked you through actually works. Line #4 should give you a clue.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Make sure your ScriptAlias is set to your CGI-Executables in your httpd.conf, and make sure you have executable permission on your Perl script.
You can also try executing the script through the command line by moving into your CGI-Executables directory and typing:
perl hello.pl (or whatever your script is called).
This way, you'll get more verbose output and a sense of what is wrong that you won't see rendered in your web browser.
Hope this helps!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|