How to install the GMP extension for elastic beanstalk on Amazon?

I have already added two files for the amazon elastic but configuration but it does not work.

.elasticbeanstalk\eb.config

files:
"/etc/php.d/project.ini" :
mode: "000644"
owner: root
group: root
content: |
extension=php_gmp.dll

.elasticbeanstalk\software.config

packages:
yum:
php7.0-gmp: [] 

Upvotes: 1

Views: 1012

Answers (2)

Danielbillion
Danielbillion

Reputation: 1

After several days. this works for me,

  1. create .ebextensions folder
  2. create a new config file instal_gmp.config
  3. Add the following: be consistent with your indentation

commands:

    command1:
            command: sudo yum install -y php73-gmp
    command2:
            command: sudo restart httpd

Upvotes: 0

Bob
Bob

Reputation: 173

I was struggling with the same issue. The solution is to install php70-gmp and to add the extension to the ini:

In any.config:

container_commands:
  01_install_gmp:
    cwd: /tmp
    command: |
      sudo yum install -y php70-gmp
files:
  /etc/php.d/z_project.ini:
    mode: "000644"
    owner: root
    group: root
    content: |
      extension=gmp.so

Upvotes: 1

Related Questions