Issues after 22.04 upgrade - PHP downgrade to 7.4

Hi Everyone,

Been running Owncloud Server for a long time, but I’m not exactly well versed. I’m missing something after upgrading to Ubuntu 22.04, then downgrading to PHP 7.4 as per the instructions from Owncloud.

I cannot connect to my server, and I get the text version of the PHP error message (attached).

I feel like I’m missing something simple, but I’m have a struggle here - my last resort will be to start fresh with a new install. Thanks in advance!

Steps to reproduce

  1. Upgraded to Ubuntu 22.04
  2. Downgraded PHP to 7.4 following Owncloud instructions

Expected behaviour

Web login page displayed.

Actual behaviour

PHP error text displayed.

Server configuration

Operating system:
Kubuntu 22.04

PHP version:
7.4

ownCloud version: (see ownCloud admin page)
10.9.1

The content of config/config.php:



{
    "system": {
        "instanceid": "ocs01jhm1kth",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "127.0.0.1",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "\/var\/www\/owncloud\/data",
        "overwrite.cli.url": "http:\/\/127.0.0.1\/owncloud",
        "dbtype": "mysql",
        "version": "10.9.1.2",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "allow_user_to_change_mail_address": "",
        "filelocking.enabled": true,
        "logtimezone": "UTC",
        "apps_paths": [
            {
                "path": "\/var\/www\/owncloud\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/owncloud\/apps-external",
                "url": "\/apps-external",
                "writable": true
            }
        ],
        "installed": true,
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpsecure": "ssl",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***"
    }
}

That version is almost two years old. There have been many security fixes in that time. Be sure to upgrade your ownCloud as soon as you get your PHP working.

What do you see when you run:
sudo a2query -m|grep php

1 Like

Thanks! Yes I’ve been neglecting updates, getting everything done over the holidays.

No output when running sudo a2query -m|grep php.

That means that you do not have your PHP module enabled, which is consistent with seeing plaintext instead of rendered PHP.

If the command:

sudo a2enmod php7.4&&sudo apache2ctl -t

succeeds with Syntax OK, you should be back in business after:

sudo systemctl reload apache2.service

1 Like

Fantastic, that did the trick. Thank you very much for your time and help. Much appreciated. Now on to continue with my updates!

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.