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天試用期) 免費: 安裝 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 物件
Response 物件
Server 物件
session 物件
Application 物件
--------------- |