Question

I am trying to create xdebug output files with php 5.2 as described enter link description here. I added the following line to the correct php.ini file:

xdebug.profiler_enable = 1

When I start the PHP script (CLI) as root, no file starting with cachegrind.out is generated in the /tmp directory. Since I do not have any issues with rights as running with root, why don't I get any xdebug output file?

Additional information:

  • No, I cannot uYse PHP 5.3
  • Yes, xdebug seems to be enabled somehow (when I try to put a line zend_extension=.../xdebug.so in php.ini I am reminded that this extension is already loaded.)
  • phpinfo() tells me that profiler_enable is OFF. Is there a way to turn it on again in the php code itself?
Was it helpful?

Solution

It seems that xdebug (and its options) have been compiled into php. A possibility to enable this particular xdebug option when running a php code is to use the -d switch of php:

php5 -d xdebug.profiler_enable=on mycode.php
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top