Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDO corruption in php-nginx-dev:8.1-* images on Mac #485

Open
dersonsena opened this issue May 7, 2023 · 3 comments
Open

PDO corruption in php-nginx-dev:8.1-* images on Mac #485

dersonsena opened this issue May 7, 2023 · 3 comments

Comments

@dersonsena
Copy link

dersonsena commented May 7, 2023

I'm using a MacBook Air M1 Ventura (13.3.1) that requires an ARM64 architecture for almost everything.

I spent some time trying to understand why a simple connection with the PDO was not working:

$pdo = new PDO('mysql:host=xxxx;dbname=xxxx', 'root', 'secret', [
    PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
]);

I had the xdebug activated and yet no errors or warnings appears in the logs, NGINX simply returned a 502 error:

<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.22.0</center>
</body>
</html>

The solution I found was upgrade to version 8.2 of this same package, but I believe version 8.1 is still widely used. I found it important to register this problem for the community to be able to solve it =)

@Petrucheqa
Copy link

Same Issue using webdevops/php-nginx-dev:8.0 image

@Petrucheqa
Copy link

I've spent three days looking for complicated solutions. I've found that the error comes from my docker configuration 😭

If x86 option is checked just uncheck it.

Capture d’écran 2023-07-04 à 14 36 33

@Blomster1
Copy link

Thx this has been helpful for me !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants