Skip to content

Commit

Permalink
Support for trigger profiling in xdebug (#55)
Browse files Browse the repository at this point in the history
Comment resolutions
  • Loading branch information
purva-vasudeo authored May 28, 2020
1 parent 91ae066 commit 837bad2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions GenerateDockerFiles/php/apache/init_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ cat /etc/motd
# Get environment variables to show up in SSH session
eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile)

# Enable trigger profiling in xdebug
if [ "${WEBSITE_PROFILER_ENABLE_TRIGGER^^}" = TRUE ] ; then
echo 'xdebug.profiler_enable_trigger=1' >> /usr/local/etc/php/conf.d/php.ini;
echo 'xdebug.profiler_enable=0' >> /usr/local/etc/php/conf.d/php.ini;
else
sed -i "s/xdebug.profiler_enable_trigger=1//g" /usr/local/etc/php/conf.d/php.ini
sed -i "s/xdebug.profiler_enable=0//g" /usr/local/etc/php/conf.d/php.ini
fi

# redirect php custom logs to stderr
if [ "${WEBSITE_ENABLE_PHP_ACCESS_LOGS^^}" = TRUE ] ; then
sed -i "s/CustomLog \/dev\/null combined/CustomLog \/dev\/stderr combined/g" /etc/apache2/apache2.conf;
Expand Down

0 comments on commit 837bad2

Please sign in to comment.