I have two amazon EC2 instances with different CPU architectures.
- x86_64 ubuntu 20.04
- arm64 ubuntu 22.04
Both are running the same docker service. However, each service is based on the corresponding CPU architecture docker image.
I've mounted a few directories from the localhost to the docker service for both instances the same way.
And when I run the PHP function like:
realpath('../tmp');
It works for the x86_64 service but it doesn't work for the arm64.
I'm not sure if the CPU architecture affects but this is the only difference between them.
Update:
When I run the Linux command realpath:
/var/www/html/public# realpath ../tmp
I get the correct path:
/var/www/html/tmp
And the PHP config is also the same for both instances/services.