Ext-intl and ext-redis required by composer

apache
php

#1

When CircleCI runs my composer, it says:

Problem 1
    - The requested PHP extension ext-intl * is missing from your system. Install or enable PHP's intl extension.
  Problem 2
    - The requested PHP extension ext-redis * is missing from your system. Install or enable PHP's redis extension.

because they are required.

I tried adding

dependencies:
  pre:
    - sudo apt-get install php5-mysql php5-intl php5-mcrypt php5-redis

to my circle.yml, but it doesn’t work

I tried also

dependencies:
  pre:
    - sudo apt-get install php5-mysql php5-intl php5-mcrypt php5-redis
    - sudo service apache2 restart

but it says

 * Restarting web server apache2
   ...fail!
 * The apache2 configtest failed.
Output of config test was:
apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.

sudo service apache2 restart returned exit code 1

Action failed: sudo service apache2 restart

#2

Can you try to do this manually via an SSH build and paste the output of the apache error log?


#3

I have installed Redis extension via PECL and I haven’t any issue:

dependencies:
  pre:
    - pecl channel-update pecl.php.net
    - pecl install -f redis

Could you try installing with PECL instead apt and check if the issue persists?


#4

It says:

pecl channel-update pecl.php.net
bash: line 1: pecl: command not found

pecl channel-update pecl.php.net returned exit code 127

Action failed: pecl channel-update pecl.php.net

#5

@pensiero, what you have configured at machine section?
Can you share a full sample of your circle.yml?


How to install PHP7 ext-intl?
#6

Sure: https://gist.github.com/pensiero/ef8bc7380fe80be46d98e496beb55553


#7

I’m not sure if it is related, but your required PHP version (5.6.17) seems to be not supported by the Circle environment: https://circleci.com/docs/environment/#php
In my builds I’m using 5.6.14. Could you try updating the constraint?


#8

Unfortunately the 5.6.14 is not supported in the Trusty version of the container (Action failed: set php version to 5.6.14)


#9

I haven’t any build on Trusty, all the configs I’ve shared are tested and are working on Precise. It makes me think that your issue is fully related to #3151.
Do you have any chance to test it with Precise and 5.6.14 in order to discard the origin of this problem?


#10

With Precise it works everything, thanks :slight_smile:
However it would be nice to know how to solve the problem with Trusty


#11

Hi,

I have a similar issues. My tests previously run in older Ubuntu using PHP 7.0.0RC7, but after upgrading to latest Ubuntu with PHP 7.0.3, the tests complain, as it seems Intl extension is missing:

PHP Fatal error: Uncaught Error: Call to undefined function locale_set_default()


#12

I seem to be having a similar issue.

sudo service apache2 restart
apache2: Syntax error on line 210 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.
   ...fail!

sudo service apache2 restart returned exit code 1

Action failed: sudo service apache2 restart

Using Precise & PHP 7.0.4. I assume this is because libphp5.so isn’t installed with PHP 7.0.4 and Apache fails to restart over that.


#13