Skip to content

Unable to use latest client file: Unable to load dynamic library '/usr/local/lib/php/extensions/amazon-elasticache-cluster-client.so' #54

Open
@pauljura

Description

@pauljura

I have a Docker image for a legacy application running PHP 8.2 with the AWS Elasticache Cluster client.

When I tried rebuilding it today, it is no longer able to load the amazon-elasticache-cluster-client.so extension.

If I copy the amazon-elasticache-cluster-client.so file out of my existing container (dated March 1, 2023) my new image will run perfectly fine. But if I download and extract the latest one (file is dated Nov 11, 2023) I get the following error:

Warning: PHP Startup: Unable to load dynamic library 'amazon-elasticache-cluster-client.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20220829/amazon-elasticache-cluster-client.so (/usr/local/lib/php/extensions/no-debug-non-zts-20220829/amazon-elasticache-cluster-client.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20220829/amazon-elasticache-cluster-client.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20220829/amazon-elasticache-cluster-client.so.so: cannot open shared object file: No such file or directory)) in Unknown on line
0

To prove the only difference is the extension, I have both extension files saved side by side and I can build 2 images with literally the only difference being which file gets included. The older one works, the newer one causes an error.

# using the old file works:
COPY amazon-elasticache-cluster-client-2023-03.so /usr/local/lib/php/extensions/amazon-elasticache-cluster-client.so
# using newer file gives an error
COPY amazon-elasticache-cluster-client-2023-11.so /usr/local/lib/php/extensions/amazon-elasticache-cluster-client.so

Something has changed, maybe there is a new dependency I'm not aware of, maybe there is a thread-safe vs. non-thread-safe mixup, I don't know. But definitely the latest file does not work for me.

Ordinarily this wouldn't be a problem, I could just keep the old file and never update it. But I'm trying to migrate this legacy app from an AMD EC2 to a new ARM64 EC2, and so I'm downloading the ARM64 client, and building my image from scratch, so now I'm getting that error. And I don't have a copy of the old client that was built for ARM64 (I didn't need it before).

What can I do? Am I missing some dependency? Can I download an older version of the extension? The download page in AWS always gives me the latest.

Thanks in advance for any help.

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