0

I'm using box: php:7.1-fpm in wercker In my code I'm using function transliterator_transliterate()

It works locally and on the server, however when running tests in wercker it is displaying error

Error: Call to undefined function \Utils\transliterator_transliterate()

Mo code is:

$string = transliterator_transliterate('Any-Latin; Latin-ASCII; [\u0080-\u7fff] remove', $string);

I already tried these solutions.

1. \transliterator_transliterate('Any-Latin; Latin-ASCII; [\u0080-\u7fff] remove', $string);

 2. added pear and php5-intl to wercker config

    - script:
        name: add pear
        code: |
          sudo apt-get install -y php-pear php5-intl
          # Configure PEAR
          pear config-set php_ini /etc/php5/cli/php.ini
          pecl config-set php_ini /etc/php5/cli/php.ini

Is there any method to check if pear is working properly or solution to make transliterator_transliterate() working?

Ali Azam
  • 2,047
  • 1
  • 16
  • 25
plusz
  • 224
  • 2
  • 16
  • Is your test environment also running PHP 7? `php5-intl` is for PHP 5. – Mathew Tinsley Dec 03 '17 at 21:41
  • are you sure? In a few places I found recommendation of adding php5-intl I'm adding in the same way also other packages, for mysql. If not php5-intl, what I should add? php-intl is not working. Another option php56-intl is not making any change – plusz Dec 03 '17 at 22:45

0 Answers0