4371 shaares
First, install PHP debugging extensions for gdb
, for example:
debuginfo-install php-5.6.8 # if you use yum
aptitude install php5-dbg # if you use aptitude
Then simply:
php_version=5.6.8
php_script_pid=$(pgrep -f $php_script_name)
curl https://raw.githubusercontent.com/php/php-src/PHP-$php_version/.gdbinit >> ~/.gdbinit
gdb …