Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I recently installed Xdebug on my server with the intention of using it for code profiling. It seems to be installed correctly, and phpinfo lists the following:

xdebug.profiler_enable       On                       On  
xdebug.profiler_enable_trigger Off                    Off  
xdebug.profiler_output_dir   /var/www/vhosts/xdebug   /var/www/vhosts/xdebug  
xdebug.profiler_output_name cachegrind.out.%p        cachegrind.out.%p

However, I can't figure out for the life of me why no cachgrinds are being created when I run the PHP scripts.

Is there something I'm missing, or understanding incorrectly?

share|improve this question
    
Perhaps this would be more suited to Stack Overflow. –  John Gardeniers Dec 28 '09 at 22:27
    
I don't believe it deals with programming at all, though. –  user12618 Dec 28 '09 at 22:35
    
Have you checked the permissions on the output directory are correct? –  LukeR Dec 29 '09 at 1:46

2 Answers 2

up vote 1 down vote accepted

Try removing the options

xdebug.profiler_enable_trigger Off                    Off  
xdebug.profiler_output_dir   /var/www/vhosts/xdebug   /var/www/vhosts/xdebug  
xdebug.profiler_output_name cachegrind.out.%p        cachegrind.out.%p

The first is a default anyway, so it's redundant. Removing the other 2 will allow you to figure out it the problem is with those options, or something else.

Restart Apache, hit a php page and see if any output is generated in /tmp. this is the default location for output logs.

If there is something generated, then you can be fairly certain it is a permissions issue with your output directory.

Check the owner of the file generated in /tmp and be sure that user has write permissions on /var/www/vhosts/xdebug (from your original config) and re-add the options you had initially.

share|improve this answer

i think is too late to give an answer.

I installed xdebug using pecl, i had just activated it in /etc/php5/apache2/php.ini by adding

extension=xdebug.so
xdebug.default_enable=1; in my setting, i set this parameter to 0
xdebug.scream=1
xdebug.profiler_enable=1 ; this activate the profiler by default. 
;You can put it off (0), but should activate it by triggring.
xdebug.profiler_enable_trigger=1
; if you do like this, you need to call your script by adding XDEBUG_PROFILE=1 
;to your url for example: http://mytest/test.php?XDEBUG_PROFILE=1

you should restart your webserver and call a php page from you navigator. The output by default will be created in /tmp.

Hope this help.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.