由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - please help, CGI..
相关主题
文件删不掉compiled on Solaris 9, run on Solaris 8?
关于一个C++library的连接CGI之Perl Script一问
where is libstdc++ 帮我看看我的GCC怎么了!谢谢
How to make unix-login online?perl出错求教
how to use setuid permission for a perl program?help: solaris interface configuration
\\\\\\\\\\\\\\\\A question about CGI//////////////GCC 一问
a question in shell script为什么root都无权改文件?
A problem[转载] 请教三个关于emacs和perl的问题
相关话题的讨论汇总
话题: cgi话题: perl话题: bin话题: do话题: html
进入Unix版参与讨论
1 (共1页)
f********u
发帖数: 572
1
it's my first time writing CGI using Perl. I have
the HTML form page ready. But whenever I submit
my form, I get the webpage of the text of the CGI
program itself. What's wrong I am doing here? How
to make it work? Two things I am not sure about..
1. does a CGI program has a required extension, say hello.cgi
or no extension at all or I can just have hello.pl ?
2. do I need to compile? It seems I can not compile like
what I do to a perl script. It gets strange html contents
onto the scre
D****g
发帖数: 2860
2
make sure it's executable, and it's under the cgi-bin dir.

【在 f********u 的大作中提到】
: it's my first time writing CGI using Perl. I have
: the HTML form page ready. But whenever I submit
: my form, I get the webpage of the text of the CGI
: program itself. What's wrong I am doing here? How
: to make it work? Two things I am not sure about..
: 1. does a CGI program has a required extension, say hello.cgi
: or no extension at all or I can just have hello.pl ?
: 2. do I need to compile? It seems I can not compile like
: what I do to a perl script. It gets strange html contents
: onto the scre

f********u
发帖数: 572
3
it has to be in the cgi-bin dir? and I can mk this cgi-bin
dir anywhere? or must be somewhere like /usr/bin/ ??
thanks ..and executable...em...do i need to have chmod +x
myself? i thought perl does that...or you mean i have to do
something else to make it executable? thanks a lot...

【在 D****g 的大作中提到】
: make sure it's executable, and it's under the cgi-bin dir.
D****g
发帖数: 2860
4
you need to do chmod a+x.
as to cgi-bin, it depends on your http server. you might want to lookup the
document

【在 f********u 的大作中提到】
: it has to be in the cgi-bin dir? and I can mk this cgi-bin
: dir anywhere? or must be somewhere like /usr/bin/ ??
: thanks ..and executable...em...do i need to have chmod +x
: myself? i thought perl does that...or you mean i have to do
: something else to make it executable? thanks a lot...

f********u
发帖数: 572
5
its too bad..I have made the dir into cgi-bin and I executed the
chomd a+x and it still does not work...what shall I do now? I
have a perl book with CGI at hand. I have tried its example because
mine does not work. but his neither. i thought maybe our platform
does not have CGI.pm, so I changed to another Solaris and another
Linux. I believe at least one of them should make it work if there
is nothing wrong with the program. but it does not..So I am thinking
there must be something else that I a

【在 D****g 的大作中提到】
: you need to do chmod a+x.
: as to cgi-bin, it depends on your http server. you might want to lookup the
: document

D****g
发帖数: 2860
6
well, it seems to me that your http server is not properly configured.
are you using apache? I'm not familiar with these stuffs at all, but I suggest
you do the following:
1. read the document of the http server.
2. test if you can execute the cgi program from a shell.
3. check in the html wheter the ACTION string contains a "?"
4. make sure the first line of the perl script contains #!/bin/perl (or
wherever perl is).
if still not working, then wait for some guru to answer your question :),
sor

【在 f********u 的大作中提到】
: its too bad..I have made the dir into cgi-bin and I executed the
: chomd a+x and it still does not work...what shall I do now? I
: have a perl book with CGI at hand. I have tried its example because
: mine does not work. but his neither. i thought maybe our platform
: does not have CGI.pm, so I changed to another Solaris and another
: Linux. I believe at least one of them should make it work if there
: is nothing wrong with the program. but it does not..So I am thinking
: there must be something else that I a

p******f
发帖数: 162
7

You didn't mention your http server or platform, but your Q1
really depends on the server configuration. As for Q2, I don't
think it is necessary to compile the perl script.

【在 f********u 的大作中提到】
: it's my first time writing CGI using Perl. I have
: the HTML form page ready. But whenever I submit
: my form, I get the webpage of the text of the CGI
: program itself. What's wrong I am doing here? How
: to make it work? Two things I am not sure about..
: 1. does a CGI program has a required extension, say hello.cgi
: or no extension at all or I can just have hello.pl ?
: 2. do I need to compile? It seems I can not compile like
: what I do to a perl script. It gets strange html contents
: onto the scre

f********u
发帖数: 572
8
thank you so much!. thanks all so much. Yes, I think I found the
problem with the help from all of you. :) I need the administrator
to set the httpd.conf in order to have my cgi-bin dir executable.
I have not got it work yet. but I am pretty sure that 's the problem.
Thanks a lot! :)

【在 D****g 的大作中提到】
: well, it seems to me that your http server is not properly configured.
: are you using apache? I'm not familiar with these stuffs at all, but I suggest
: you do the following:
: 1. read the document of the http server.
: 2. test if you can execute the cgi program from a shell.
: 3. check in the html wheter the ACTION string contains a "?"
: 4. make sure the first line of the perl script contains #!/bin/perl (or
: wherever perl is).
: if still not working, then wait for some guru to answer your question :),
: sor

1 (共1页)
进入Unix版参与讨论
相关主题
[转载] 请教三个关于emacs和perl的问题how to use setuid permission for a perl program?
请教e-mail的设置\\\\\\\\\\\\\\\\A question about CGI//////////////
漆血柜求a question in shell script
怎么在FTP里改变文件属性?A problem
文件删不掉compiled on Solaris 9, run on Solaris 8?
关于一个C++library的连接CGI之Perl Script一问
where is libstdc++ 帮我看看我的GCC怎么了!谢谢
How to make unix-login online?perl出错求教
相关话题的讨论汇总
话题: cgi话题: perl话题: bin话题: do话题: html