運行安裝文件(ZendServer-CE-php-5.3.2-5.0.1-Windows_x86.exe)開始安裝,選項請參照我的選擇。
這里不做改動,維持默認選擇即可
點擊Browse按鈕更改安裝目錄,比如這里設置的是D盤
更改Web Server Port為85 以避免跟IIS沖突,如果你沒有IIS那么沒有關系的。
錯誤1:
安裝完成因Zend Server存在配置文件編碼的錯誤,需要手工做更改。
用記事本打開D:\Program Files\Zend\ZendServer\etc\ZendEnablerConf.xml文件。
將
鍩??xml version="1.0" encoding="UTF-8"?>
更改為
<?xml version="1.0" encoding="UTF-8"?>
否則會無法啟動zend server,網頁顯示錯誤500。
在控制面板中打開Apache Service Monitor(右鍵點擊圖中第二排第一個圖標)
重新啟動Apache(點擊Restart按鈕)
在瀏覽器中打開地址:http://localhost:10081/ZendServer/
也可在開始菜單中找到Zend Server的快捷方式打開Zend Server配置界面做一下配置
勾選同意協議單選框。 為Zend Server設置一個密碼 去除Email通知選擇 配置完成后進入到Zend Server控制面板
這里提醒一下的是Server Setup > Directives 中的Error Handling and Logging組中的display_errors在日后開發中會常用到。
主要作用是打開或者關閉PHP的錯誤提示。
錯誤二:輸入http:/localhost/無法打開。這個主要是起先你設置的時候,設置的端口號不是80,而默認是訪問這個端口的。
可以如此訪問:http://localhost:85/
修改端口號:
例如可以將Apache監聽的端口改為81或其他任何一個未被使用的端口。 Apache修改監聽端口的方法為: 打開 httpd.conf 修改 Listen 80 為 Listen 81 Apache 可以同時監聽一個以上的端口實現多個Http服務 只要添一行 如 Listen 82 即可 同樣IIS也可以修改默認的端口以避開沖突 修改方法類似 打開 Administrative Tools -> Internet Services Manager 點選 Default Web Site(或其他自定義的Site) -> 右擊選Properties 點選 Web Site -> Advanced... 修改TCP Port 為有效值即可。
這里有更詳細的設置情況:http://bbs.cfan.com.cn/thread-189702-1-1.html
錯誤三:默認路徑
appache默認路徑一般是 X:\Program Files\Zend\Apache2\htdocs X表示你的盤符。
那么現在我想改到其他地方應該怎么辦?
那需要修改httpd.conf(在此E:\Program Files\Zend\Apache2\conf目錄下)
找到DocumentRoot開頭的選項,修改為你想要的路徑就可以。
例如:
DocumentRoot "D:\MyExperiment\php"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "D:\MyExperiment\php">
記住所有你的修改,在保存之后,都必須重新啟動appace服務才行。