php: zend server 安裝及相關配置

運行安裝文件(ZendServer-CE-php-5.3.2-5.0.1-Windows_x86.exe)開始安裝,選項請參照個人選擇。php

 

ZS01

ZS02

ZS03這裏不作改動,維持默認選擇便可html

ZS04

點擊Browse按鈕更改安裝目錄,好比這裏設置的是D盤瀏覽器

ZS05ZS06更改Web Server Port爲85 以免跟IIS衝突,若是你沒有IIS那麼沒有關係的。app

ZS07

ZS08

ZS10

錯誤1:ide

安裝完成因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。this

在控制面板中打開Apache Service Monitor(右鍵點擊圖中第二排第一個圖標)編碼

ZS13

從新啓動Apache(點擊Restart按鈕)rest

ZS14在瀏覽器中打開地址:http://localhost:10081/ZendServer/server

也可在開始菜單中找到Zend Server的快捷方式打開Zend Server配置界面作一下配置
勾選贊成協議單選框。 爲Zend Server設置一個密碼 去除Email通知選擇 
ZS11配置完成後進入到Zend Server控制面板

這裏提醒一下的是Server Setup > Directives 中的Error Handling and Logging組中的display_errors在往後開發中會經常使用到。

主要做用是打開或者關閉PHP的錯誤提示。xml

ZS12

錯誤二:輸入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服務才行。

相關文章
相關標籤/搜索