Apps :: perl monkey and cgi



I don't know if it's something stupidly wrong, but I just tried it from the 1.5 liveCD and it worked fine.  Let's try it a little differently just to make sure.

Start the 1.5 dsl live cd.  Under the right click menu, choose
System->daemons->Monkey Web Server->monkey start

Select the text below, open a new xshell and use the middle button to paste these lines:

Code Sample
sudo cat > /opt/monkey/cgi-bin/test.cgi << "EOF"
#!/usr/bin/perl -wT
print "Content-type: text/html\n\n";
print "Test Page<P>\n";
EOF
sudo chmod 755 /opt/monkey/cgi-bin/test.cgi
dillo 127.0.0.1/cgi-bin/test.cgi


Then dillo should open up with the test page (you might need to hit return after the last line is pasted).  Did that work?  It worked for me.  The first part created the file (between sudo cat... and EOF).  You might not have been saving your file into /opt/monkey/cgi-bin if you weren't root.  The second part set the permission on the file.  If you weren't root the chmod command might not have worked (the sudo <command> runs a command as root).

As far as what you are doing wrong, does ls -l /opt/monkey/cgi-bin show your file in the cgi directory?  Is it -rwxr-xr-x (chmod 755)?  The /opt/monkey/cgi-bin directory is only writeable by root, so if you don't use sudo before your commands when dealing with that directory and things you want to put into it and modify, you might not have permission to do so.

Keep that hope, you might need it later.

I'm getting a little response now from my guestbook.cgi
but ther'e still troubles
go to http://manouche.nl and click on the wagon
Maybe you know what's wrong

It looks like you're trying to use a shockwave plugin?   I don't have shockwave for dsl.  It isn't in there as part of the liveCD distro, you know that right?  I would assume that shockwave *.swf files go into the htdocs directory while cgi and perl files go into cgi-bin.  swf files are more like gif or jpegs in that the browser (or its plugins) make them work.  CGI files are run server side on machine you download the files from.

Try putting files that need to run from your machine (CGI, perl, python, that sort of thing) into the /opt/monkey/cgi-bin directory and all other files (html, gif, jpg, mp3, swf) into the /opt/monkey/htdocs directory (chmod 664).

Good luck!

Ok I will try from the bottom
Thanks for the help.
I will get this to work.
I'll let you know.

I tryed every possible chmod I could think of.
I tryed placing the guestbook files in htdocs.
Then adjusted the paths in the script.
reinstalled the guestbook from scratch.
It drives me craszy this guestbook.
But I wo'n't quit on it.
I moved my server from XP to DSL.
feels like rocket sciense but I will never go back to XP
Oh yeh I could take some other cgi guestbook.
But hey it works under windows xp and it's suposed to be made for linux. No not me I'll get this son off a.... to work.
It took me a lot of effort to get it like I wanted it to be.
For the love of God I won't give in to Microsoft. Linux I love you.

Next Page...
original here.