Reputation: 31471
I am trying to learn xdebug. I have the following script:
<?php
echo "This";
xdebug_start_trace('/home/dotancohen/xdebug');
echo "That";
xdebug_stop_trace();
?>
My /home/dotancohen/
directory is permissions 711 and the ~/xdebug
file is permissions 777. However, the file is not being written to. There are no errors thrown in the PHP script, and it functions exactly as one would expect disregarding the xdebug lines.
Why might the file not be written to?
EDIT: These are the xdebug configuration lines from php.ini:
extension=ssh2.so
;extension=xdebug.so
zend_extension="/usr/lib64/php/modules/xdebug.so"
extension=mongo.so
extension=memcache.so
Upvotes: 3
Views: 2972
Reputation: 31471
It turns out that this line:
xdebug_start_trace('/home/dotancohen/xdebug');
Writes to this file:
/home/dotancohen/xdebug.xt
Therefore, touch
ing ~/xdebug.xt
and chmod
ing it to 777 resolved the issue.
Upvotes: 3
Reputation: 1172
try to call xdebug_start_trace without parameters to see if it's your directories and/or file that your script don't like :P
without parameters it will create a file in the current directory as configured by the xdebug.trace_output_dir
Upvotes: 1