顯示具有 Server 標籤的文章。 顯示所有文章
顯示具有 Server 標籤的文章。 顯示所有文章

2010年9月7日 星期二

如何在XAMPP下加裝ASP.NET模組

測試平台 XAMPP 2.5, Apache 2.2.9。

安裝模組為mod_aspdotnet-2.2.0.2006-setup-r2.msi
根據[2]指出,要依不同的apache版本選用不同的安裝程式。
[1]應該是原始出處,安裝前需安裝Microsoft .NET Framework 2.0,[2]中提到建議用Mircosoft .NET Framework 3.5以上。筆者實測結果,.NET 4.0 無法安裝,.NET 2.0 可正常運作。

一開始安裝時,可能要搜尋apache所在的位置,遇到無回應似當掉的情形,須耐心等待。

安裝後,修改apache/conf/httpd.conf
在最後端加入下列資訊

#asp.net
LoadModule aspdotnet_module "modules/mod_aspdotnet.so"

AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo

<IfModule mod_aspdotnet.cpp>
# Mount the ASP.NET /asp application
AspNetMount /SampleASP "c:/SampleASP"
#/SampleASP is the alias name for asp.net to execute
#"c:/SampleASP" is the actual execution of files/folders in that location

# Map all requests for /asp to the application files
Alias /SampleASP "c:/SampleASP"
#maps /SampleASP request to "c:/SampleASP"
#now to get to the /SampleASP type http://localhost/SampleASP
#It'll redirect http://localhost/SampleASP to "c:/SampleASP"

# Allow asp.net scripts to be executed in the /SampleASP example
<Directory "c:/SampleASP">
Options FollowSymlinks ExecCGI
Order allow,deny
Allow from all
DirectoryIndex index.htm index.aspx
#default the index page to .htm and .aspx
</Directory>

# For all virtual ASP.NET webs, we need the aspnet_client files
# to serve the client-side helper scripts.
AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) "C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4"
<Directory "C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles">
Options FollowSymlinks
Order allow,deny
Allow from all
</Directory>
</IfModule>
#asp.net

/SampleASP 可換成自訂的別名
c:/SampleASP 可換成自訂的路徑
重新啟動apache,將範例程式存成.aspx放到路徑資料夾中,開啟瀏覽器測試即可。
ASP.NET範例程式:

<%@ Page Language="VB" %>
<html>
<head>
<link rel="stylesheet"href="intro.css">
</head>
<body>
<center>
<form action="index.aspx" method="post">
<h3> Name: <input id="Name" type=text>
Category: <select id="Category" size=1>
<option>One</option>
<option>Two</option>
<option>Three</option>
</select>
</h3>
<input type=submit value="Lookup">
<p>
<% Dim I As Integer
For I = 0 to 7 %>
<font size="<%=I%>"> Sample ASP.NET TEST</font> <br>
<% Next %>
</form>
</center>
</body>
</html>

附注:
ASP與ASP.NET不是相同的東西,XAMPP目前沒有提供原生ASP的環境模組[6],Apache::ASP用途是將ASP語法轉為Perl語法。
Reference:
[1] How to make Apache run ASP.NET / ASP.NET 2.0 - Ohad's Blog
[2] Matttt的空間: Apache運行asp.net
[3] 倍星資訊工作室 's Blog - AppServ 跑asp
[4] Summary of mod-aspdotnet on SourceForge
[5] 如何在Apache上執行 ASP.NET之安裝教學 @ 羽澈.Net :: Xuite日誌
[6] Do Microsoft Activer Server Pages (ASP) work with XAMPP?

2009年8月16日 星期日

安裝可攜版XAMPP windows 1.7.1 注意事項 in WinXP

XAMPP[1]是一套整合Apache, Mysql, PHP 與Perl 的網頁伺服器架設軟體,

不但容易上手,也有免安裝的版本,只要幾個步驟便能移植到別台電腦[2]。
安裝時的最新版是1.7.2,似乎因改版幅度較大有點缺陷,
MySQL的服務狀態無法啟動。故選用1.7.2,在此做個心得備忘。

Step 1:
不管將XAMPP資料夾放在那,執行"setup_xampp.bat"就對了。

節錄官網說明
如果你將XAMPP解壓縮在最上層目錄,像c:\xampp或d:\xampp 等目錄,你可以直接啟動XAMPP。 這表示你不需要事先執行"setup_xampp.bat"。Apache, MySQL 和 Mercury 郵件伺服器將可以正常啟動。 只有 FileZilla 檔案傳輸伺服器無法啟動,因為它需要絕對路徑設定才可以正常執行。 對以上這些方法來說:請不要使用雙層的XAMPP目錄,例如 c:\xampp\xampp ! 你需要的是單獨的xampp資料夾,例如 d:\xampp(\apache 其它等等)。 否則你就必須在啟動前,先執行一次"setup-xampp.bat",來進行路徑的更新動作。
Step 2:
執行xampp-control.exe
Shell : 產生一個命令提示字元視窗,可用指令式設定。[1.7.2]
Setup : 執行setup_xampp.bat。[1.7.2]
Port-Check : 檢查所需連接埠狀態 [1.7.2]
Status : 檢視所有服務狀態。[1.7.1]
Service : 將xampp-control.exe安裝為服務。[1.7.1]
(p.s. WebDAV服務:使用戶端透過HTTP協定就可以新增、刪除、修改網頁上的資料。[1.7.2])
Explore : 檢視XAMMP資料夾。
SCM : Services Control Manager的縮寫,開啟 Windowns 系統服務管理員。
Refresh : 重新整理模組狀態。
Help/Close Help : 顯示/關閉說明視窗。
Exit: 離開。

可Start/Stop各種服務,或Admin開啟管理介面。
服務停用時,勾選Svc可安裝為Windowns 系統服務,。
(服務與一般開機啟動的程式不同是,使用者不用登入亦可運作。)
Tomcat,提供支援JSP的服務。[1.7.2]
Step 3:
啟用所須服務後,網頁環境算已建立好了,
但很多帳密都是預設值,需要重新設定帳密增加安全性[3][4]。

完。

2007年10月14日 星期日

強大的郵件伺服系統-Mercury Mail Transport System

Pegasus Mail (System Overviews)
http://www.pmail.com/overviews.htm

節自網頁說明:


Mercury Mail Transport System: Mercury is a free, standards-based mail server solution, providing comprehensive, fast server support for all major Internet e-mail protocols. It is supplied in two versions, one hosted on Windows systems, the other running as a set of NLMs on Novell NetWare file servers.

Pegasus Mail: Pegasus Mail is a free, standards-based electronic mail client suitable for use by single or multiple users on single computers or on local area networks. A proven product, it has served millions of users since it was released in 1990. It is extremely feature-rich and powerful, yet remains small and fast.

Pegasus Mail 是同一頁面的另一個軟體,是Client端的收信軟體是用在區域網路中的,在此跳過不研究。



相關網頁:
メールサーバの構築(MercuryMail編)
http://www.aconus.com/~oyaji/mail2/mercurymail.htm
Mercury/32の基本設定をしていこう
http://mizushima.ne.jp/Windows/Mail/Mercury/Mercury-setting.php
嚴家銘的個人網站 - 國立虎尾科技大學機械設計工程系副教授
http://yen.mde.nfu.edu.tw/pivot/entry.php?id=182

2007年10月7日 星期日

免費PHP網路相簿整理

SimpleViewer
http://www.airtightinteractive.com/simpleviewer/


心得:
必須透過利用 Porta 、 Picasa2的軟體將相片的資料夾輸出,再放上伺服器。
也可以用一些php的程式在sever端處理。如
SimpleViewerAdmin。
英文說明文件:
View instructions on how to use SimpleViewer

網頁寫著:
Note: SimpleViewerAdmin currently supports SimpleViewer v1.7. Ben Hughes has updated SimpleViewerAdmin to work with SimpleViewer v1.8.

但Ben Hughes的站連不上,SimpleViewerAdmin 1.3 + SimpleViewer v1.7上傳圖片會失敗,也不是中文路徑的問題@@,沒有多人使用環境,但官方提供的範例還蠻好看的。

預設登入:admin/admin


Singapore
http://singapore.sourceforge.net/
Demo:
http://singapore.sourceforge.net/demo/

心得:
測試版本是v 0.10.1,支援多國語言,可選擇用CSV或是SQL的方式存資料,預設使用CSV,初步試用了一下多人環境不是很好用,使用者只能設adminstrator或user權限, 設User權限什麼都做不了。設adminstrator又可以改其他人的權限。中文支援也不是很完美,上傳中文名的圖檔會看不到圖,如果在上傳時另外指定成英數檔名,看的到圖後再改中文名稱,就可以正常顯示…囧。但有多種templates可更換,個人使用還算不錯。

預設登入:admin/password

參數設定在 singapore.ini 檔
較重要設定如下:

default_language = "zh_tw" //改預設語言為繁體中文
default_charset = "utf8" //改預設字元集為utf8


[Reference]
Mobile01 [分享] 簡單好用的相簿軟體 SimpleViewer
http://www.mobile01.com/topicdetail.php?f=256&t=115238&cache=0
Minyen™ - [筆記]安裝PHP網路相簿 - Singapore
http://blog.minyen.twbbs.org/index.php?m=11&y=06&entry=entry061111-031251
Singapure - 簡潔好用的 php 相簿 | joaoko’s blog
http://blog.joaoko.net/archives/8
Neo's Blog: 網路相簿 singapore 中文語系設定
http://www.neo.com.tw/archives/000202.html
Neo's Blog: 精選五種 PHP 網路相簿總覽
http://www.neo.com.tw/archives/000009.html

2007年10月4日 星期四

架設SMTP / POP伺服器-MailEnable Standard Edition

∵架設SMTP伺服器-Free SMTP Server 有每日只能寄10封信的大缺點。
∴找了這套
MailEnable Standard Edition
http://www.mailenable.com/standard_edition.asp


操作介面與 IIS 的設定環境很像

優點:免費,有POP功能,目前還沒發現有什麼使用限制。
小缺點:要安裝,有點複雜。

2007年10月3日 星期三

架設SMTP伺服器-Free SMTP Server

Free SMTP Server
http://www.softstack.com/freesmtp.html

優點:免費、簡單。
缺點:無法常駐為服務或縮小至工具列。
補救方法:可用watchcat 縮至工具列。

大缺點:每日只能寄10封信…囧。

隱藏系統視窗到工具列的應用程式-WatchCat

測試方法:
PHP 函數-mail()