【问题标题】:Blackfire profile cli scriptsBlackfire 配置文件 cli 脚本
【发布时间】:2015-08-17 14:05:54
【问题描述】:

我想使用 blackfire 来分析 symfony 的 php 命令。 我按照这里的入门部分https://blackfire.io/getting-started for mac os。

然后我创建一个包含此内容的文件 test.php 来测试 blackfire:

<?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 不给我 url 来查看调试结果

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

有人可以帮帮我吗?

【问题讨论】:

    标签: php symfony command-line-interface blackfire


    【解决方案1】:

    好的,我发现我的错误,

    $ php -v
    

    给我

    PHP 5.5.25 (cli)
    [...]
    

    我安装了错误版本的 blackfire

    brew install blackfire-php56
    

    所以我卸载了 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
    

    【讨论】:

      猜你喜欢
      • 2018-04-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多