w*s 发帖数: 7227 | 1 【 以下文字转载自 Linux 讨论区 】
发信人: wds (净洗前尘,从头再来), 信区: Linux
标 题: perl cgi.pm checkbox reset question
发信站: BBS 未名空间站 (Wed Oct 31 19:01:08 2012, 美东)
i have a checkbox,
2 buttons: submit, reset.
when i click submit, my page can properly display "this button checked",
or "... unchecked".
but if it's in checked state, i press reset, never cleared.
tried examples online, doesn't work for me.
anyone can help me out ? |
|
a*******s 发帖数: 38 | 2 where can I find sample code for web based database in
Perl/CGI and mysql
thank you very much! |
|
y*********r 发帖数: 3 | 3 I want to use Perl CGI to generate some excel files for people to download
from web browsers. Does anyone have idea how to do it? Thanks very much. |
|
l***h 发帖数: 139 | 4 www.cgi-resources.com (hope correct) |
|
v***o 发帖数: 5 | 5
simple SMTP programming is not hard at all. you can open a socket at port 25
to the destination mail server, specify the sender and recipient, and then the
data, and off you go.
or you can use a lot of mail utilities available on the web. sun has a java-baed
mail util method in the jdk too.
the following is a simple java mail program. you can change it a little bit
and invoke the program inside CGI |
|
ft 发帖数: 106 | 6 Write a TCP socket. send "get http://*******/**.cgi?*******" |
|
m*****u 发帖数: 2 | 7 本人现在把电脑设置成服务器。安装了apache2.0.(windows环境下)。想把专业的c++
toolbox 放在网上。这样可以trial 或者test 这些程序。不知道如何在cgi下设置及编译
,调用那些c++程序。需要安装那些c++编译器?如果有相关的source地址,请大侠指
点。本人纯属新手,请大侠赐教。多谢多谢。bow//. |
|
c*p 发帖数: 31 | 8 【 以下文字转载自 Programming 讨论区,原文如下 】
发信人: ccp (yeti), 信区: Programming
标 题: Per/CGI 表单:两类元素如何绑定?
发信站: Unknown Space - 未名空间 (Thu Mar 31 02:31:53 2005) WWW-POST
设计了这样一个表单界面:
[]0.bmp ()A ()B
[]1.bmp ()A ()B
.................
[]100.bmp ()A ()B
[submit]
Note:
[]:checkbox 选择文件
(): radio button 选择文件性质A or B,插入不同field in DB
这个界面是由前面负责转换文件的script产生的一个中间界面,动态的显示一系列转换过
的文件。
Question:
表单提交后,变量checkbox 和radion button 是不同的数组变量,怎样才能关联在一起
处理? 比如一个二位数组变量?(perl支持?) 还是别的方法?
或者界面不用checkbox?用其他的元素?
多谢各位相助! |
|
c******n 发帖数: 4965 | 9 就是跟pipe 类似。
webserver 把client request 打到你cgi 程序的STDIN 上,你print STDOUT 到
client socket
for example
client uses nc to talk to server:
echo "GET / HTTP 1.1
" | perl -ne 'END {
print "HTTP/1.1 200 OK
blahblah
}' |
|
s*****k 发帖数: 604 | 10 Window和unix-like系统中,如何启动一个外部程序,
并且设置它的环境变量,输入一些数据到这个程序stdin,
并且获得这个程序输出到stdout的结果?
问这个问题是想知道编写支持CGI的web服务器的大致原理。 |
|
w*s 发帖数: 7227 | 11 Don't know how to describe this clearly,
i have a simple perl CGI code, running with lighttpd.
it has checkbox, if it's set, when you click "submit".
it will trigger my code in the background,
`set_my_value.exe 1`.
if no check that checkbox,
`set_my_value.exe 0`.
Now when i run Rapid7 nexpose, which is a security check application,
it can call my "set_my_value" directly.
So even i didn't check/uncheck the checkbox.
It's setting the values.
Seems lighttpd doesn't support perl taint mode (someone ... 阅读全帖 |
|
G*****h 发帖数: 33134 | 12 运行 cgi 的那个系统用户跟你自己的用户不一样 |
|
o******1 发帖数: 1046 | 13 运行cgi的就是我自己的一个perl文件。奇怪的是perl不认shell的环境变量。甚至做了
如feng443所建议的,用一个shell script做container来装C可执行程序,并且在这个
shell script中包括#!/bin/bash以及source用户配置文件也不行。我还试过,哪怕是
echo $HOME都不打印。
难道告诉perl程序环境变量,只有用$ENV{}这样的一个一个的手动载入?有没有更
elegant的办法啦? |
|
w**2 发帖数: 724 | 14 【 以下文字转载自 Programming 讨论区 】
发信人: wds2 (阿旺), 信区: Programming
标 题: Any future for CGI/FastCGI ?
发信站: BBS 未名空间站 (Wed Feb 25 19:36:03 2015, 美东)
just curious to see if it's totally dead or not |
|
f********h 发帖数: 149 | 15 it depends on the configuration of the web server. Sometimes
you don't need to specify the cgi directory. |
|
t*****t 发帖数: 72 | 16 yep, i am using Linux. but how can i relate these configurations to
my problems. Or if I just want to test my cgi code at the local machine,
what should I do? many thanks |
|
t*****t 发帖数: 72 | 17 o, my script worked after I put it in the public_html/cgi-bin
directory, and visit it through any browsers.
Still wondering if or not there are any ways that I can test it
by "localhost" or sth not bound to my website. //bow |
|
k*o 发帖数: 46 | 18 write a CGI to test Transfer-Encoding:chunked
but when I use printf or fwrite to output 0xA,
I will actually get 0xD 0xA.
how to avoid this situcation?
for example, my data is 0xA 0x1 0x2.
i hope the client gets 0xA 0x1 0x2 instead of 0xD 0xA 0x1 0x2.
thanks. |
|
D****r 发帖数: 309 | 19 Hi guys,
I want to make a login page of a web for secured content.
But I don't which of the above 2 would be better. Reading from wiki for php,
it says >30% web-brocken has to do with php:
http://en.wikipedia.org/wiki/PHP#Security
How do you think this? is cgi better for my task, heard it is sort of perl?
thanks for your reply... |
|
b****n 发帖数: 464 | 20 我现在的工作需要维护一个网站。在执行perl的时候,为了安全的原因,用了 perl -T
(tainted)。然后接下来有一步需要用 param(“xxx”) 获得变量值。这个一般都没有
任何问题。
只有一个罕见的情况。当用户在表格里填入单独一个加号 “+” 的时候,到param()
这步会出问题
Insecure dependency in require while running with -T switch at /global/xxx..
..xxxx/CGI.pm line 533.
BEGIN failed--compilation aborted.
这个问题目前只发现在单独一个加号上。换作其他符号,或者正常的词,或者是加号前
面或后面有空白,都不会出问题。
看起来这个问题是perl内部的。但是有没有什么好办法可以work around呢?
谢谢! |
|
w*s 发帖数: 7227 | 21 when login to a webpage, it'll popup window asking for username and password.
each time i have to type in them.
is there a way in CGI code (perl, python etc.) to prefill the username ?
like using cookie etc.
(the reason is user doesn't know username for existing products,
just password, don't ask me why.
but in the password file in lighttpd/apach, always username:pswd) |
|
w*s 发帖数: 7227 | 22 thanks for everyone's reply,
not sure i asked clearly.
in my perl CGI code, i don't have things to generate a popup window,
it's from lighttpd web server (similar to apache).
so if i turn on module.Auth in the configure file,
every time i open that page, it'll popup the login window.
in the following answer, the variable is "username",
but i don't know what lighttpd expects. |
|
c*****m 发帖数: 1160 | 23 听起来好像是apache的权限设置,你要在server本地有密码才能访问那个文件。
那样就跟cgi/html都无关了。这个问题要移到linux坛子才合适。 |
|
w*s 发帖数: 7227 | 24 网页打开都没问题,你点个checkbox,然后按submit,
后台就把用一个小程序把debug_level turn on.
如果uncheck,再submit, debug level就off。很简单的CGI。
但用上述的那个web security application来攻击我的网页,
很容易就把我的debug level改来改去。
我估计就是从网页的源程序看见有这个checkbox,然后模拟把check或者uncheck往web
server上送。
server分不清是不是用户从网页上click的,于是也傻呼呼地执行了。
当然是我傻。
但不知道怎么改。有劳大侠了。 |
|
e*******o 发帖数: 4654 | 25 perl -E 'say for %ENV'
把这个结果导入到你的cgi script? |
|
s*****V 发帖数: 21731 | 26 来自主题: Programming版 - c写CGI 不用C的话,一般用啥?python 的CGI好使么? |
|
g****t 发帖数: 31659 | 27 来自主题: Programming版 - c写CGI 最流行的都是perl啊
我当年抄过聊天室什么的乱改改
全忘光了
: 不用C的话,一般用啥?python 的CGI好使么?
|
|
c*********e 发帖数: 16335 | 28 来自主题: Programming版 - c写CGI cgi挺简单的,记得当年老师就给了点表格,好像就是一些request变量什么的,反正没
有那么高深。用perl讲的。php就是把perl变了变。php发明者不能算原创。 |
|
o*******e 发帖数: 31 | 29 use system in perl is just like u excute
any unix command or shell script in unix
shell.
That means u can call any unix command or
useful script from the yr cgi perl |
|
f****u 发帖数: 12 | 30 是这样的.
我一哥们在system执行他的一个C程序.
在单独运行时OK,可作为CGI program时确不运行.
他程序里包括一个绘图的LIB,就是那儿出的问题.
总觉得两者运行时的环境设置不一样. |
|
su 发帖数: 149 | 31 But Where should I put this?
Since the execution of a CGI script is not in a
login shell, no login scipts are executed in advance. |
|
l***r 发帖数: 17 | 32 first, make sure your server support cgi. Then in your HTML code, make a form
which is handled by a perl script.
BTW, Better use php later.
result.
that? |
|
D****g 发帖数: 2860 | 33 make sure it's executable, and it's under the cgi-bin dir. |
|
D****g 发帖数: 2860 | 34 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 | 35 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 发帖数: 572 | 36 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! :) |
|
n*****a 发帖数: 10 | 37 I am trying to write a webpage connected to a CGI/Perl script for submitting some content.
I transform the content into a email, and send to someone.
Do you know any effective way to improve reliability? Such as mail server down, connection failure.
Thank you |
|
p*r 发帖数: 2 | 38 偶知道唯一办法是用JAVASCRIPT window.open(),可以设定大小,选项
,与CGI无关.
~PWR |
|
n****u 发帖数: 12 | 39 Hi, guys,
I am using Perl/cgi to display some webpages. I used xml::dom to parse the
files first to get variables from an xml file. Then output html by using
print. Why couldn't I display the page from a browser? Error: 500 Internal
Server Error. It can output result from Unix commandline(html script). Then,I
did the following,
1. Deleted the xml parsing part from the code, with html part left, it can
display from browser fine (of cause I cahnged those variables in html into
normal text)
2. Add |
|
n****u 发帖数: 12 | 40 What perl editor do you use? Is there one that can simulate server to run cgi
file? I tried some, but don't know if it's reliable. Also, Is
"/var/log/httpd/error_log" a route under perl or something? Thanks. |
|
|
p****p 发帖数: 3360 | 42 There is some problem with the links.
Right click. Choose "copy link location". Paste the link to an open notepad.
The 4 letter code after "http://scop.mrc-lmb.cam.ac.uk/scop/rsgen.cgi?pd=" is your structure ID.
Go to pdb.org and get your structure. |
|
|
b********6 发帖数: 34 | 44 STEP 3 最后冲刺a class="__cf_email__" href="/cdn-cgi/l/email-protection" data-cfemail="1bf2b8b7636e63727a74736e722822235b7c767a727735787476">[email protected]/* */ |
|
|
C******g 发帖数: 2930 | 46 It seems that as soon as Final Fantasy XIII released, the hype train at
Square Enix began for Final Fantasy Versus XIII. In a Japanese magazine
interview, Nomura has been detailing Final Fantasy Versus XIII, and things
are looking promising:
- The in game graphics have been upgraded, so much so that there is no real
difference between the CGI (prerendered video) and the graphics in game.
- More detailed information regarding the development of Agito XIII and
Versus XIII to come in early 2010.
- |
|
t****v 发帖数: 9235 | 47 --刷盘子
加拿大最低工资11.75
美国最低工资7.25
--马工
加拿大有没有马工? 这个问题问得好
PHP,Java语言都是加拿大人发明的, C和Unix也有加拿大人贡献
没有加拿大人,美国马工要饿死80%
美国政府医保网站,找加拿大公司做
比如CGI,美国纽约,洛杉矶,休斯顿,芝加哥,华盛顿,加州,德州许多政府系统都
是CGI在做
欧洲就更不计其数,从国防到财政政府各大部门
这是2015 project
CGI was the first large cloud provider to receive the U.S. Federal Risk and
Authorization Management Program (FedRAMP) cloud security certification.[81]
CGI has also received the Defense Information Systems Agency’s (DISA)
cloud security accreditation,[82] and CGI offers cloud services throu... 阅读全帖 |
|
|
t******n 发帖数: 2939 | 49 ☆─────────────────────────────────────☆
stillwell (cgi) 于 (Thu May 2 15:05:23 2013, 美东) 提到:
1. 没有证据
2. 没有现场
3. 没有凶器
4. 没有经过
5. 没有动机
现在被你们这帮别有用心的和跟风人云亦云的满嘴谩骂,满世界追杀,天天骚扰,无情
陷害,难不成就凭她和朱令在一起住过? 就凭她参加的实验组里能接触到铊溶液?
清华有铊的实验室又不是一个两个, 北京满大街卖铊的的地方多了。朱令认识的和接触
的人又不是只有sw一个,吃个肉夹馍,喝个矿泉水,接受个生日蛋糕,煎个药,热个饭
,吃个面包的机会,时候和地点多了去了,为啥能非得说那毒一定是在宿舍里中的?
面对上述问题,你们回答不了,sw当然是无辜的了,而且比窦娥还冤枉。
☆─────────────────────────────────────☆
cannotsleep (cannotsleep) 于 (Thu May 2 15:07:09 2013, 美东) 提到:
sw指挥若定!!。。。
zt标 题: Re: 说... 阅读全帖 |
|
|