PHP 8.0 FPM run with Valgrind

Viewed 26

I want to detect the memory leak using the Valgrind on PHP 8.0 FPM / Apache environment. I have tried change the DAEMON command in the /etc/init.d/php8.0-fpm but cannot achieve it. Here is the change for the DAEMON command:

export USE_ZEND_ALLOC=0 #Add new for valgrind testing

PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="PHP 8.0 FastCGI Process Manager"
NAME=php-fpm8.0
CONFFILE=/etc/php/8.0/fpm/php-fpm.conf
# DAEMON=/usr/sbin/$NAME #Removed for valgrind testing
DAEMON="valgrind --leak-check=full --log-file=/var/log/valgrind-log-%p.log /usr/sbin/$NAME"
DAEMON_ARGS="--daemonize --fpm-config $CONFFILE"

Not sure anything need to be configured to achieve it.

0 Answers
Related