Eclipse PHP PHPUnit - Eclipse使用错误的php.ini文件 [英] Eclipse PHP PHPUnit - Eclipse use the wrong php.ini file
问题描述
C: \Users\Jerome\AppData\Local\Temp\zend_debug\session6671704870793012233.tmp\php.ini
而不是:
C:\程序文件(x86)\EasyPHP-5.3.6.1 \apache\php.ini
我不明白,因为在运行 - >运行调试配置...
在替代PHPPHP X调试被选择配置正确的屏幕截图显示:
这是正常行为太平洋夏令时。使用Xdebug的PDT会在启动脚本时将指定的PHP ini文件的两个副本创建到临时目录中。第一个与指定的PHP ini文件相同。第二个是真正用于发布的内容。
在第二个中,include_path字段总是被删除。此外,一些字段将添加到文件的底部,如下所示:
--- / path / to / specified / php。 ini
+++ /path/to/temp/zend_debug/session2594175249121649690.tmp/php.ini
;;;;;;;;;;;;;;;;;;;
@@ -785,7 +786,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX:/ path1:/ path2
-include_path =...
;
; Windows:\path1; \path2
; include_path =。; c:\php\includes
@@ -1852,3 +1852,6 @@
;本地变量:
; tab-width:4
;结束:
+
+ date.timezone =亚洲/东京
+ memory_limit =256M
如何解决include_path启动?
基本上,PHP Include Path属性用于解决项目的依赖关系。特别地,PHPUnit由在工作空间首选项中定义的用户库来解决。请参阅以下图像。
I try to use PHPUnit and each time when I load the tests the php.ini file loaded is this one :
C:\Users\Jerome\AppData\Local\Temp\zend_debug\session6671704870793012233.tmp\php.ini
instead of :
C:\Program Files (x86)\EasyPHP-5.3.6.1\apache\php.ini
I don't get it because in Run -> Run debug configurations ...
in alternate PHP "PHP X debug" is selected which is configured right as the screenshot shows it :
This is normal behavior of PDT. PDT with Xdebug creates two copies of the specified PHP ini file into your temporary directory when launching a script. The first one is the same as the specified PHP ini file. The second one is what is really used for the launch.
In the second one, the include_path field is always removed. Additionally some fields are added into the bottom of the file as follows:
--- /path/to/specified/php.ini
+++ /path/to/temp/zend_debug/session2594175249121649690.tmp/php.ini
;;;;;;;;;;;;;;;;;;;
@@ -785,7 +786,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
-include_path = "..."
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
@@ -1852,3 +1852,6 @@
; Local Variables:
; tab-width: 4
; End:
+
+date.timezone= "Asia/Tokyo"
+memory_limit = "256M"
How to solve the include_path for launching?
Basically, the PHP Include Path property is used to solve dependencies for a project. Especially, PHPUnit is solved by a user library which is defined in the workspace preferences. See the following images.
这篇关于Eclipse PHP PHPUnit - Eclipse使用错误的php.ini文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!