Apache 支持 Asp :Sun One ASP

1.Windows XP

2. apache 2.0.59

  下载的包:apache_2.0.59-win32-x86-no_ssl.msi

3. Sun Java System Active Server Pages 4.0.2 (不支持apache2.2)

下载地址: http://www.sun.com/download/products.xml?id=420a8e72
在安装Sun One Asp过程中. 在指定httpd.conf要进行配置时,如果无法获取httpd.conf文件,有两种可能:

a. 你的apache版本不是Sun One Asp所支持的;

b. 可能你的httpd.conf里的ServerName要改成 ServerName 你的服务器IP:80

4. 安装完后基本上可以运行asp了,别忘了在httpd.conf里的DirectoryIndex加上asp(添加主页索引)

5. 修改注册表,允许父路径
Sun One asp不支持父路径的解决方法:
打开注册表:把[HKEY_LOCAL_MACHINE/SOFTWARE/ChiliSoft/chiliasp/Parameters下的EnableParentPaths的值0改为1,重启一下apache就行了(如果不行,就重启服务器吧)。


以下问题就是因为Sun One asp默认不支持父路径
************************************************
Active Server Pages error 'ASP 0131 : 80004005′Disallowed Parent Path

XXXXX.asp, line XX

The Include file '../XXXX.htm' cannot contain '..' to indicate the parent directory.
************************************************

 

6. 但在response.redirect时会无法动作(只是不会转向到指定的网页..不会产生错误)

此时..在response.redirect叙述前加上
Response.Status = "302 Object Moved"

 

 

 

另附:

Windows 2000 server + Apache + PHP + ASP

 

讓Apache Web Server 也能解譯ASP程式

有下列幾種:

要付費:(30天試用期)
SUN的ChiliSoft ASP:Sun ONE Active Server Pages v3.6.2 (每部主機要美金 $495)
iASP:STRYON提供的 InstantASP (授權金 ? )

免費:
OpenAsp:原始下載網站為 http://www.activescripting.org/html/download.html,不過依據網路上的文獻,好像自1999年就關站了。又,根據其說明文件,此元件只能支援Apache Server的版本 1.3.0 到 1.3.6。

安裝 OpenAsp:(以版本 Apache 1.3.27 示範) / 下載 apasp.dll 元件壓縮檔

1.將下載的元件 apasp.DLL 複製於硬碟上任一地方。(建議在/Apache Group/Apache/modules,可統一管理)

2.編輯httpd.conf:由『開始』-『程式集』-『Apache HTTP Server』-『Configure Apache Server』-『Edit the Apache httpd.conf Configuration File』;或直接進入『/Apache Group/Apache/conf』編輯。

3.尋找『mime.types』,除了原有的AddType application/x-tar .tgz 及 AddType image/x-icon .ico 外,再加上 AddType text/x-asp asp 這一行。

4.在此設定檔的最下面一行,加上 LoadModule asp_module modules/apasp.dll (此dll檔存放的位置)

5.將Apache Server重新 restart:開始』-『程式集』-『Apache HTTP Server』-『Control Apache Server』-『Restart』

6.接下來就可以開始來測試了。利用文字編輯器編寫程式:<%=now %> ,並存在/Apache Group/Apache/htdocs(預設的web root)成 test.asp

7.在瀏覽器網址列輸入:http://127.0.0.1/test.asp

8.成功。

9.OpenAsp的限制:由於這個模組仍屬測試版,故部份物件與方法不支援。茲將原始說明文件提到的限制,條列如下:

ObjectContext No

Request 物件

Request.ClientCertificate No
Request.QueryString Yes
Request.Form Yes
Request.Cookies Yes
Request.ServerVariables Yes
Request.TotalBytes No
Request.BinaryRead No

Response 物件

Response.Buffer Yes
Response.CacheControl No
Response.Charset No
Response.ContentType Yes
Response.Expires Yes
Response.ExpiresAbsolute No (almost supported)
Response.IsClientConnected No
Response.Pics No
Response.Status No
Response.AddHeader Yes
Response.AppendToLog Yes
Response.BinaryWrite Yes
Response.Clear Yes
Response.End Yes
Response.Flush Yes
Response.Redirect Yes
Response.Write Yes

Server 物件

Server.CreateObject Yes
Server.HTMLEncode Yes
Server.MapPath Yes
Server.ScriptTimeout No
Server.URLEncode Yes

session 物件

Session Yes
Session.Abandon Yes
Session.CodePage No
Session.Contents Yes
Session.LCID No
Session.SessionID Yes
Session.StaticObjects No
Session.Timeout Yes
Session_OnStart Yes
Session_OnEnd No

Application 物件

Application Yes
Application.Contents Yes
Application.Lock Yes
Application.Unlock Yes
Application.StaticObjects No
Application_OnStart Yes
Application_OnEnd No

Standard Base Components No

---------------
Global.asa 不支援
---------------



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值