I'd like to use PHPstorm and remote debugging on a production server but on a development virtual host on the same server. using apache 2.4 + PHP 5.5.
I have one production CPANEL server with several web applications (Drupal + Wordpress.) I have a local dev environment that never quite matches production (for a variety of reasons.) I have read lot's of warnings about not using xdebug on production but I would like to make a distinction about the server and the virtual host.
ref:
- Will enabling XDebug on a production server make PHP slower?
- How can I use xdebug to debug only one virtual host?
- Setup Xdebug and PHPStorm with remote server
- enabling xdebug remote debug makes apache server very slow
If load xdebug.so in the standard php.ini and disable it, will it affect performance on production (I imagine there may be some memory increase for apache) I also will have zend optimizer loaded and enabled.
For my development virtual host, I can disable zend optimization and enable the xdebuger.
I can see two ways to do this, either in .httacces (as in How can I use xdebug to debug only one virtual host?) or have a special php.ini just for the development application.
- What is preferred approach / tradeoff?
- Will production performance be affected?
- Is this a reasonable approach?
If the local php.ini can disable the debugger, will there be performance risk if it is loaded? Can the php.ini just load it for a specific (dev) web application?
Other approaches could be to run a seperate instance of apache but I'm concerned its beyond my tiny brain :)