2015-08-17 26 views
1

我想使用blackfire來剖析symfony的php命令。 我按照剛纔的入門部分https://blackfire.io/getting-started for mac os。Blackfire個人資料cli腳本

然後,我創建與此內容測試blackfire文件test.php的:

<?php 
    echo "Hello World !"; 

但是當我做

blackfire run php test.php 

發生錯誤:

PHP Warning: PHP Startup: blackfire: Unable to initialize module 
Module compiled with module API=20131226 
PHP compiled with module API=20121212 
These options need to match 
in Unknown on line 0 

Warning: PHP Startup: blackfire: Unable to initialize module 
Module compiled with module API=20131226 
PHP compiled with module API=20121212 
These options need to match 
in Unknown on line 0 

如果我刪除我的php.ini的以下代碼,我沒有任何錯誤,但黑火不給我的網址,看看調試的結果

[blackfire] 
extension="/usr/local/Cellar/blackfire-php56/1.0.0/blackfire.so" 
blackfire.agent_timeout = 0.25 

有人可以幫我嗎?

回答

0

好吧,我發現我的錯誤,

$ php -v 

給我

PHP 5.5.25 (cli) 
[...] 

和我裝blackfire的錯誤版本

brew install blackfire-php56 

所以我unsinstall blackfire和重新安裝

brew uninstall blackfire-php56 
brew install blackfire-php55 

終於更新我的php.ini

[blackfire] 
extension="/usr/local/Cellar/blackfire-php55/1.0.0/blackfire.so" 
blackfire.agent_timeout = 0.25 
+0

將它用於Windows的工作嗎? –