在Appsev 1.7啟動CGI服務的方法!!【教學】



贊助商連結


頁 : [1] 2

mattliou
2002-08-20, 08:57 PM
Dear all,
本來我是發言求救的!!
但是在我自己的嘗試之下我想或許我找出方法了,
在我自己的主機上可以運作,
我也希望在其他使用appsev的主機上可以運作!!
把我的努力分享出去∼
首先去下載ActivePerl-5.6.1.629這個檔案,並安裝到電腦上,
然後用記事本開啟Appserv目錄下的apache\conf\httpd.conf這個檔案,
然後找到以下這段文字:
<Directory "C:/AppServ/www">
#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
Options Indexes FollowSymLinks MultiViews
然後在MultiViews後面空一格加上ExecCGI
尋找到:
#
# Apache parses all CGI scripts for the shebang line by default.
# This comment line, the first line of the script, consists of the symbols
# pound (#) and exclamation (!) followed by the path of the program that
# can execute this specific script. For a perl script, with perl.exe in
# the C:\Program Files\Perl directory, the shebang line should be:

#!c:/usr/bin/perl.exe
以上那一行是已經修改過的了,請改成你的本機的安裝目錄


然後存檔重新啟動這樣就行了!!
希望大家都能成功喔!

贊助商連結


mattliou
2002-08-20, 09:02 PM
忘了說不用更改路徑就能用原始的#!/usr/bin/perl執行的方法,
就是在安裝ActivePerl的時候將安裝的目錄改成:
C:\Usr\就行了!!(前人經驗)

JeRry-GoNg.
2002-09-16, 05:30 PM
請問安裝路徑是哪裡?
他給我的預設路徑是D:/Perl/ 耶?

cyjye
2002-09-26, 11:56 AM
原來內定安裝好沒啟動,難怪程式老是不能跑....
感謝大大提供.....回家再試試~~~~~~

jason523
2002-11-20, 08:27 PM
我安裝Perl的路徑是C:\Perl\ 耶?
那我設perl的路徑不是#!c:/usr/bin/perl.exe

我想要問一下..依我安裝perl的路徑
那我是不是要改成#!C:/Perl/bin/perl.exe
或是#!C:/Perl/ or #!C:/Perl/bin/perl

請問是要設哪個ㄋ? (還是都可以?)

xmbs
2003-03-27, 03:48 PM
重裝成C:\usr\對往後會比較方便
以後.CGI的開頭就是#!c:/usr/bin/perl

dj301
2003-03-27, 06:59 PM
不用裝perl嗎?

xmbs
2003-03-27, 07:54 PM
mattliou 前面就有提到了'首先去下載ActivePerl這個檔案,並安裝到電腦上'...
要注意的只是安裝目錄

geniusonizuka
2003-03-29, 07:28 PM
那asp哩??
有救嗎@@a..........

jakko
2003-05-14, 08:30 PM
http://www.herbage.org/tackynote/tackynote.cgi
他並沒有執行程式,而變成出現文字的檔案。

我所承租的組機他給我了一些相關的資料。
#!/usr/bin/perl

實際路徑 /usr/local/psa/home/vhosts/herbage.org/cgi-bin
/usr/local/psa/home/vhosts/herbage.org/httpdocs/test.html

這兩個,我現在的問題就是不知道哪裡出了錯。