I updated to PHP 7.3.20 and now I can't log in anymore

PLEASE HELP!

I updated to PHP 7.3.20 and got a 502 error after logging in to NC. I can no longer use the NC.

Bad Gateway
Web server received an invalid response while acting as a gateway or proxy server.

I get the following error when I try to log in to NC.

[error] 21578#0: *2 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: IP-ADDRESS, server: MY-NEXTCLOUD, request: "POST /index.php/login HTTP/2.0", upstream: "fastcgi://unix:///var/www/vhosts/MY-NEXTCLOUD/php-fpm.sock:", host: "MY-NEXTCLOUD", referrer: "https://MY-NEXTCLOUD/"

I simply updated my PHP.
How do I recover?

I’ve tried restarting the server, MySQL, Nginx and php-fpm.


NC19.0.0, PHP 7.3.20, MariaDB 10.2.32, Nginx 1.16.1, CentOS 7.7

You probably need to upgrade all apache php modules as well. I could be wrong but I don’t think these get automatically upgraded just because you upgrade php. Here’s a list and there could be some missing.

libapache2-mod-php7.?
php7.?-common
php7.?-mbstring
php7.?-xmlrpc
php7.?-soap
php7.?-apcu
php7.?-smbclient
php7.?-ldap
php7.?-redis
php7.?-gd
php7.?-xml
php7.?-intl
php7.?-json
php7.?-imagick
php7.?-mysql
php7.?-cli
php7.?-mcrypt
php7.?-ldap
php7.?-zip
php7.?-curl

They seem to be installed.

They seem to be installed.

That doesn’t mean they ARE installed. How did you check it IN DETAIL?
Please show the results. Make sure that you check it for the PHP web
AND ALSO for the PHP cli components.

I am facing the exact same problem.
Fully working Nextcloud, today updated php to 7.3.20.
All php packages have been updated and are definetly installed.

Nextcloud is completely broken.

Additionally, syslog shows:

[kernel] [2179740.435747] traps: php-fpm[21410] trap invalid opcode ip:5577c7cfae14 sp:7ffc92c32980 error:0
[kernel] [2179740.435750] in php-fpm[5577c7928000+4c8000]

I would try to use the search function of this forum to find matching answers, because these kind of questions are asked and answered on a regular base and are not Nextcloud specific :wink:

1 Like

Isn’t it clear that this is a newly introduced regression?
Is your nextcloud working on 7.3.20?

have you tried creating and testing your php configuration using “phpinfo.php” ? If not, I would recommend it.

create a new textfile and enter the following:

<?php phpinfo(); ?>

then save as “phpinfo.php” under your default web root directory. In my case, I’m using ubuntu 20.04, it’s “/var/www/html”. Open it using your browser (eg: http://127.0.0.1/phpinfo.php).

I can see the phpinfo itself. What items in phpinfo should I be suspicious of?

just thought of something. Have you disabled 7.2 and enable 7.3?

a2dismod php7.2
a2enmod php7.3

as far as phpinfo, it’s more of what’s not showing up. If it’s not listed on the table, that probably means the file you have is not compatible

I’m 7.3 only.

I am on Nextcloud 18.0.6.
With PHP 7.3.20, php-fpm segfaults when accessing Nextcloud.
I’ve switched to PHP 7.4.8, Nextcloud works ok.
Switching back to PHP 7.3.20, php-fpm segfaults again.
This is on Debian 9.

I also switched to PHP 7.4.8 and I got NC to work. Is this issue specific to PHP7.3.20?

General.
Is Nextcloud in PHP 7.4 working stably anymore?
Should I take this opportunity to switch to a PHP 7.4 environment?

I’ve been using 7.4 with no issue.

Seem like 7.3 is NOT compatible with nextcloud.

1 Like

PHP 7.3 is working like a charm with Nextcloud. In most cases users are forgetting to install all required or removing all legacy components or are not configuring their PHP environment in the right way.

1 Like

Hello,
You have a problem with php-fpm (FastCGI Process Manager). Users of Apache doesnt need this. All command lines with a2dismod or apache module are useless.

When you updated php, did you say “yes” when the updater offered to keep the configuration files of the developer ?
First, check that php7.3-fpm is running : systemctl status php7.3-fpm

Same problem here. Nextcloud with php 7.3.20 fpm broken.
It worked before flawlessly with php 7.3.19.
I upgraded from latest nc 18 to latest nc 19, still broken.

Welcome page works, login not possible.
“Nice” error message:
“proxy_fcgi:error *** Connection reset by peer: *** AH01075: Error dispatching request to :”
(after the last “:” there is just nothing.)

I’m loving it!

I’m having the same issue. Upgraded to php 7.3.20 yesterday. Now I can’t login to Nextcloud or use the dav-API. Same issue with 7.2.32. Nextcloud was working perfectly with 7.3.19.

This is the error message in the logs.

[Wed Jul 15 11:08:50.433405 2020] [proxy_fcgi:error] [pid 26086:tid 140618688878336] [client 77.22.176.119:52511] AH01067: Failed to read FastCGI header
[Wed Jul 15 11:08:50.433486 2020] [proxy_fcgi:error] [pid 26086:tid 140618688878336] (104)Connection reset by peer: [client 77.22.176.119:52511] AH01075: Error dispatching request to :

If you’re in a hurry to solve the problem, you’ll have to switch to PHP 7.4.
I made a hasty switch to PHP 7.4, but I still don’t understand the downside.

For various reasons, I cannot go to php 7.4 easily on that server.
I also do not understand the problem. All other Webapplications work fine on that server, with the very same php configurations. Just nextcloud does not work with latest 7.2.X and 7.3.X (I tested both now).