In the course of diagnosing an issue with a PHP module (xdebug in this case) kept re-enabling itself during upgrades of libapache2-mod-php7.0, I found the following:
1. libapache2-mod-php7.0 postscript sources /usr/lib/php/php-maintscript-helper from php-common to re-enable modules that have not been administratively disabled.
2. php-maintscript-helper calls phpenmod based on the output and return codes of phpquery
3. phpquery calls its own action() function, which initializes the $ret variable to 0
4. phpquery action() calls into various other functions in the script, and sets the $ret variable based on their returns
5. phpquery action() returns 0
6. php-maintscript-helper correspondingly calls phpenmod on all available php modules for the apache2 SAPI
In the course of diagnosing an issue with a PHP module (xdebug in this case) kept re-enabling itself during upgrades of libapache2- mod-php7. 0, I found the following:
1. libapache2- mod-php7. 0 postscript sources /usr/lib/ php/php- maintscript- helper from php-common to re-enable modules that have not been administratively disabled.
2. php-maintscript -helper calls phpenmod based on the output and return codes of phpquery
3. phpquery calls its own action() function, which initializes the $ret variable to 0
4. phpquery action() calls into various other functions in the script, and sets the $ret variable based on their returns
5. phpquery action() returns 0
6. php-maintscript -helper correspondingly calls phpenmod on all available php modules for the apache2 SAPI
Source link for xenial: https:/ /git.launchpad. net/~usd- import- team/ubuntu/ +source/ php-defaults/ tree/phpquery? h=ubuntu/ xenial# n162
the following addition to action() after the esac is necessary to bubble up the internal functions' returns:
return $ret