How would one go about installing the apache module? Neither the precise or trusty containers (or this method) include the apache module; they all fail trying to (still trying to load the php5 module, php7 module not there) on apache restart
I believe all I need is libphp7.so; when I install from another repo (ppa:ondrej/php) it removes the php5 module and adds the php7 module from my apache “mods available” and “mods enabled” as well.
We have just started using CircleCI and I’m not especially familiar with rbenv, so I’m just kind of puttering away trying to get it to work. Our project wont run on PHP5 unfortunately…
We have a plan to ship a new container image first for 12.04 and then 14.04 to fix this issue sometime next week. In the meantime, I just built a PHP 7.0.4 package for 12.04 so that you can workaround this.
Here’s everything we did in circle.yml to move to PHP7.1:
dependencies:
pre:
# Set up php-redis.
# The PHPAPI version (20160303) needs to match.
# If we start using a different version of PHP this section may need to be updated.
- sudo apt-add-repository -y ppa:ondrej/php
- sudo apt-get update
- sudo apt-get install php-redis php-igbinary
- echo 'extension=/usr/lib/php/20160303/redis.so' | sudo tee /opt/circleci/php/7.1.0/etc/conf.d/redis.ini
- echo 'extension=/usr/lib/php/20160303/igbinary.so' | sudo tee /opt/circleci/php/7.1.0/etc/conf.d/igbinary.ini
# Set up Apache with SSL and tell Apache to use the PHP installation that CircleCI has provided.
- echo 'LoadModule php7_module /opt/circleci/php/7.1.0/usr/lib/apache2/modules/libphp7.so' | sudo tee /etc/apache2/mods-available/php7.load
- sudo cp /etc/apache2/mods-available/php5.conf /etc/apache2/mods-available/php7.conf
- sudo a2dismod php5
- sudo a2enmod php7
machine:
pre:
- sudo apt-get update; USE_PRECOMPILE=true sudo -E circleci-install php 7.1.0
php:
# Specify a PHP version, since we depend on it above.
version: 7.1.0