Mixed PHP Versions - Deployment Fails

Hi there,

I have a server managed by cleavr with two sites. Both use PHP 8.0.

One of these sites should use PHP 8.1, so I installed PHP 8.1 as service and set it as the required PHP version for this site. When I deploy my code, the deployment fails at step “Activate New Deployment”.

The details show:

Activate New Deployment 20220603055255526
Activated /home/example-staging/staging.example.org/releases/20220603055255526
Reloading PHP-FPM
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper

(I replaced the site name by example).

Any idea how to fix that?

Thanks and best regards
Sebastian

Hello @sewid,

We’ll look into the issue and get back to you.

Hello @sewid,

We’ve identified the bug with server user and fixed the issue for you.

We’ll be releasing a fix shortly for everyone.

Please try re-deploying and let us know whether that works for you or not.

1 Like

Hi @anish, it is working, thanks a lot!

1 Like

Hi @anish,

the problem occured the last time at my staging environment. Now I want to deploy to the live environment - same error again :frowning:

Can you please help me again?

Thanks!
Sebastian

Did you change anything? I had another deployment running and it is working now. The last deployment showed me the error from the first post:

Activate New Deployment 20220709114157614
Activated /home/example/example.org/releases/20220709114157614
Reloading PHP-FPM
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper

Now, it was working…

Hello @sewid,

Sorry about the trouble caused. I’ve fixed the issue for you.

Actually, we’ve fixed the issue already for new servers but since it was an old server the issue was still there.

I hope you’ll understand.

Thanks a lot! Is there anything I can do to prevent the error on this server for future deployments?

I think the server is good to go since I’ve fixed it for all the users in this server.

Let us know if the issue persists. Also you can SSH into the server and run the following command:

echo "{{ serverUser }} ALL=NOPASSWD: /usr/sbin/service php{{ phpVersion }}-fpm reload" >> /etc/sudoers.d/php-fpm