On my PHP 5.5 server I run the production system in one folder and the development one in another using the same web server - which is great as the testing on the development code is done on the same environment as production.
Now the problem is that I would like to use XDebug for debugging in the development folder. I can load the xdebug extension in php.ini, but then that will also affect the production folder, which is obviously not desirable (see other threads about performance hits and security issues and in just overall never have XDebug loaded for production).
Since PHP 5.3 I cannot load extensions with the dl() function dynamically, so I don't see any way to get this extension loaded only for the development folder.
Did I miss anything? Any way to load PHP extensions like XDebug dynamically only for certain folders?
EDIT: I'm using Apache with FCGI