Zend PDT Eclipse + Zend Server Communication Edition(CE)

本来是想用 Zend PDT Eclipse + PHP5.3 + Apache2.2作为开发环境的,可是:

1.      Zend debugger can't support php5.3 TS (Thread Safe) ,所有安装 Zend Debugger php5.3 TS里不成功

 

http://forums.zend.com/viewtopic.php?f=59&t=1742 ,里面有写“ Zend Debugger supports only the non-thread-safe php architecture

 

2.      php5.3 NTS (Non Thread Safe) 又没有 php5apache2_2.dll and php5apache2.dll

3.      尝试用 php5.2.12 TS,也是安装不成功

4.      尝试用 php5.2.12 NTS,安装了 zend debugger之后无法启动 apache the error is:

[crit] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe.  You need to recompile PHP

 

So I have to use Zend PDT Eclipse + Zend Server Communication Edition(CE) solution, 其中 Zend Server 包括了 Apache2.2 + PHP5.3 + Zend Debugger + Zend Framework ,即是一个集成好的 php server 环境,一劳永逸 ,不需要再装 php and apache

 

1.      Download Zend PDT Eclipse all in one package and Zend Server CE from http://www.zend.com/en/community/pdt

2.      Extract   Zend PDT Eclipse and run eclipse.exe

3.      Create a new PHP Project named "phpWorks" (We assume the path is “d:/eclipse/workspace/phpWorks” , it will be used in Step 4 ), and create a php file named "test.php" with following codes:

            <?php

            $name = "world";

            for ($i = 0; $i <5; $i++) {

                        print("Hello, $name ($i)!/n");

            }

            ?>

4.      Install Zend Server, and then open Zend Apache conf/httpd.conf file, add following settings at the end of the file

Alias /phpWorks "d:/eclipse/workspace/phpWorks "

<Directory "d:/eclipse/workspace/phpWorks ">

  Allow from all

</Directory>

5.      restart Zend Apache

6.      in eclipse PDT, for PHP script file, you can try to right click PHP file and select “Debug as > PHP Script”. For PHP Web Page file, you can try to right click PHP file and select “Debug as > PHP Web Page(it is very useful)

 

注意: After install Zend Server and run it, it will automatically run apache server and open "http://localhost:8080/ZendServer ", you may see following error message:

Internal Server Error:

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

More information about this error may be available in the server error log.

 

Check apache error.log file in Zend Apache server folder, you will find following error

[error] Zend Enabler cannot load because of a problem in its configuration file: XML parse error on line 1 column 1 - invalid byte '?' at position 3 of a 3-byte sequence

 

查看 Zend Server/ect/ZendEnablerConf.xml 文件,发现开头有乱码 ,删除文件头部乱码。启动成功。

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值