3 # Has to be run as admin
5 # To be kept in sync with setup_php_travis.sh
7 # @todo make it optional to disable xdebug ?
12 # note: these settings are not required for cli config
13 echo "cgi.fix_pathinfo = 1" >> "${1}"
14 echo "always_populate_raw_post_data = -1" >> "${1}"
16 # we disable xdebug for speed for both cli and web mode
20 PHPVER=$(php -r 'echo implode(".",array_slice(explode(".",PHP_VERSION),0,2));' 2>/dev/null)
22 # this is done via shivammathur/setup-php
23 #configure_php_ini /etc/php/${PHPVER}/fpm/php.ini
26 apt-get install php$PHPVER-fpm
27 cp /usr/sbin/php-fpm$PHPVER /usr/bin/php-fpm # copy to /usr/bin
29 # use a nice name for the php-fpm service, so that it does not depend on php version running
30 #service "php${PHPVER}-fpm" stop
31 #ln -s "/etc/init.d/php${PHPVER}-fpm" /etc/init.d/php-fpm
33 # @todo shall we configure php-fpm?
35 service php$PHPVER-fpm start
36 service php$PHPVER-fpm status
39 a2enconf php${PHPVER}-fpm
40 service apache2 restart