douqian3712 2015-06-24 13:03
浏览 82
已采纳

在Vagrant机器上查找xDebug时,PhpStorm 8 Interpreter读错了php.ini

I've been trying to set up xDebug with Vagrant and PhpStorm 8. It is supposed to simplify the process a lot, but for me it was exactly the opposite. In PhpStorm 8 we can set up Interpreters on a Vagrant maching. This is my setup.

enter image description here

The connection is set up - no problem here, the PHP binary is also found and responding. However, you can see the message Debugger: Not installed.

PhpStorm does not detect xDebug because it is looking at the CLI config file (/etc/php5/cli/php.ini) instead of /etc/php5/apache2/php.ini, where debugger is installed.

I find it rather strange that it would look for the Cli config while it is usually a different config file for web servers.

How can I make PhpStorm detect the debugger? Should I copy all configuration from /etc/php5/apache2/php.ini to /etc/php5/cli/php.ini (these are substantially different in my remote environment and I want to keep them different). Has anyone encountered the same prblem?

  • 写回答

1条回答 默认 最新

  • douqiangchuai7674 2015-06-24 13:14
    关注

    Well, PS is supposed to look at the Cli config, because it executes the PHP binary other SSH. I have a separate ini file for each PHP Module and I use the same in Web Server and Cli configuration. In my php5/cli/conf.d folder I have symlinks pointing to the modules in my mods-available folder.

    |-- cli
    |   |-- conf.d
    |   |   |-- 05-opcache.ini -> ../../mods-available/opcache.ini
    |   |   |-- 10-mysqlnd.ini -> ../../mods-available/mysqlnd.ini
    |   |   |-- 10-pdo.ini -> ../../mods-available/pdo.ini
    
    |   -- php.ini
    |-- mods-available
        |-- curl.ini
        |-- gearman.ini
        |-- imagick.ini
        |-- intl.ini
        |-- mcrypt.ini
        |-- mongo.ini
        |-- mysqli.ini
        |-- mysql.ini
        |-- mysqlnd.ini
        |-- opcache.ini
        |-- pdo.ini
        |-- pdo_mysql.ini
        |-- readline.ini
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 一道python难题2
  • ¥15 一道python难题
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备