Here you can find the instructions for installing Xdebug and Kcachegrind to profile and debug PHP applications.
Supposing that you’re using the penguin, with Debian or *buntu, there are a few steps ( very easy steps ) that you have to do in order to set up an environment which helps you on debugging PHP and profiling scripts.
First of all install the software:
1 2 3 |
|
then modify your php.ini
:
1
|
|
inserting these lines of code:
1 2 3 4 5 6 |
|
Remember to change, obviously, the values for profiler_output_dir
and zend_extension
.
TIP: to get zend_extension
value use:
1
|
|
Then remember to give apache write premissions of the profiler output directory and restart it:
1
|
|
Now you can navigate your local applications and find generated files in the output directory: you need to open these files with Kcachegrind and… …profile them!