Visitar URL original
`bref-extra:oci8-php-80` doesn't work · Issue #323 · brefphp/extra-php-extensions · GitHub
Skip to content

bref-extra:oci8-php-80 doesn't work #323

Description

@benzoh

Hello. Let me ask you a question.
I think I've defined the extension correctly, but it doesn't work.

↓ serverless.yml

functions:
    # This function runs the Laravel website/API
    web:
        handler: public/index.php
        timeout: 28 # in seconds (API Gateway has a timeout of 29 seconds)
        layers:
            - ${bref:layer.php-74-fpm}
            - ${bref-extra:oci8-php-80}
        events:
            - httpApi: '*'
    # This function lets us run artisan commands in Lambda
    artisan:
        handler: artisan
        timeout: 120 # in seconds
        layers:
            - ${bref:layer.php-74} # PHP
            - ${bref:layer.console} # The "console" layer

plugins:
    # We need to include the Bref plugin
    - ./vendor/bref/bref
    - ./vendor/bref/extra-php-extensions

image

image

image

Do I need to set anything else?

Activity

  1. Nyholm commented on Feb 16, 2022

    @Nyholm
    Collaborator

    It all looks correct. You should probably also add oci8 layer in your artisan function.

    What version of bref/extra-php-extensions are you running? Looking at your second screenshot , the "compatible runtimes" seams weird.

    Btw, the layer is verified with: https://github.com/brefphp/extra-php-extensions/blob/master/layers/oci8/test.php

  2. benzoh commented on Feb 17, 2022

    @benzoh
    Author

    Thank you for your reply.

    But I can't increase the runtime version of the extension.

    Isn't it necessary to set the parameter here to PROVIDED_AL_2?

    image

    image

  3. Nyholm commented on Jun 21, 2022

    @Nyholm
    Collaborator

    FYI: This layer was just updated by @Nemo64

  4. Nemo64 commented on Jun 21, 2022

    @Nemo64
    Contributor

    I didn't touch the oci8 layer, I modified the odbc-snowflake layer.

  5. Nyholm commented on Jun 21, 2022

    @Nyholm
    Collaborator

    Oh, Im confused.

    Sorry for the ping

  6. renanwilliam commented on Aug 22, 2022

    @renanwilliam

    I have the same issue, did you solve it @benzoh ?

  7. benzoh commented on Aug 22, 2022

    @benzoh
    Author

    @renanwilliam yes. I solved it by defining the layers myself. Please have a look.

    serverless.yml looks like this.

    functions:
      app:
        handler: public/index.php
        layers:
          - ${bref:layer.php-80-fpm}
          - arn:aws:lambda:ap-northeast-1:XXXXXXXXXXXX:layer:lambda-oci8-layer:3
        events:
          - http:
              path: api/hoge
              method: GET
  8. renanwilliam commented on Aug 23, 2022

    @renanwilliam

    Strange, your Dockerfile looks like the same in the official repo. Is there something relevant different that I was not seeing?

  9. benzoh commented on Aug 23, 2022

    @benzoh
    Author

    I think the solution is to publish with the PROVIDED_AL_2 runtime. I published layer with --compatible-runtimes provided.al2 options.

    aws lambda publish-layer-version \
        --layer-name lambda-oci8-layer \
        --description "My oci8 layer" \
        --license-info "MIT" \
        --zip-file fileb://dest/oci8.zip \
        --compatible-runtimes provided.al2 \
        --compatible-architectures x86_64
  10. karunakapil commented on Mar 23, 2023

    @karunakapil

    I am getting this error : 'user' directive is ignored when FPM is not running as root.
    Below is my function code in serverless.yml
    c-api:
    handler: index.php
    description: ''
    timeout: 28 # in seconds (API Gateway has a timeout of 29 seconds)
    layers:
    - ${bref:layer.php-80-fpm}
    - arn:aws:lambda:us-east-1:553035198032:layer:gcc72-lambda1:4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions