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

PHP7: Call to undefined function OC\\\\App\\\\simplexml_load_file #15708

Closed
strk opened this issue May 23, 2019 · 8 comments
Closed

PHP7: Call to undefined function OC\\\\App\\\\simplexml_load_file #15708

strk opened this issue May 23, 2019 · 8 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@strk
Copy link

strk commented May 23, 2019

Steps to reproduce

  1. disable php5 in apache2
  2. enable php7.0 in apache2
  3. restart apache
  4. go to nextcloud deploy url

Expected behaviour

it works as before

Actual behaviour

you get a blank page, nextcloud.log tells you:

"app":"PHP","method":"GET","url":"/settings/admin/serverinfo","message":"Error: Call to undefined function OC\App\simplexml_load_file() at lib/private/App/InfoParser.php#65"

Server configuration

Operating system:
Debian 9

Web server:
Apache2.4

Database:
PostgreSQL

PHP version:
7.0

Nextcloud version: (see Nextcloud admin page)
13.0.12

Updated from an older Nextcloud/ownCloud or fresh install:
Updated from the very early fork version

Where did you install Nextcloud from:
I forgot

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
An unhandled exception has been thrown:
Error: Call to undefined function OC\App\simplexml_load_file() in ...lib/private/App/InfoParser.php:64

With php5:
Enabled:
  - activity: 2.6.1
  - calendar: 1.6.1
  - comments: 1.3.0
  - contacts: 2.1.5
  - dav: 1.4.8
  - federatedfilesharing: 1.3.1
  - federation: 1.3.0
  - files: 1.8.0
  - files_pdfviewer: 1.2.1
  - files_sharing: 1.5.0
  - files_texteditor: 2.5.1
  - files_versions: 1.6.0
  - files_videoplayer: 1.2.0 
  - firstrunwizard: 2.2.1
  - gallery: 18.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.1.0
  - mail: 0.8.3
  - notes: 2.5.1
  - oauth2: 1.1.1
  - password_policy: 1.3.0
  - provisioning_api: 1.3.0
  - serverinfo: 1.3.0
  - sharebymail: 1.3.0
  - survey_client: 1.1.0
  - systemtags: 1.3.0
  - theming: 1.4.5
  - twofactor_backupcodes: 1.2.3
  - updatenotification: 1.3.0
  - workflowengine: 1.3.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - files_trashbin
  - nextcloud_announcements
  - notifications
  - user_external
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "debug": "true",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "oc.kbt.io"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/oc.kbt.io",
        "htaccess.RewriteBase": "\/",
        "dbtype": "pgsql",
        "version": "13.0.12.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "php",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "enable_previews": false
    }
}

Are you using external storage, if yes which one: NO
Are you using encryption: NO

Are you using an external user-backend, if yes which one: NO

@strk strk added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels May 23, 2019
@kesselb
Copy link
Contributor

kesselb commented May 23, 2019

Thank you for reporting this issue 👍 We have a similar issue for a newer nextcloud version: #15642

And another report for an older version: #2180

I'm not sure if something with the code is wrong. I guess that the php-xml extension is not loaded. Mind to check your php configuration and ensure that php-xml is enabled?

@strk
Copy link
Author

strk commented May 23, 2019

Installing php7.0-xml fixed it for me. Thanks.

@strk strk closed this as completed May 23, 2019
@strk
Copy link
Author

strk commented May 23, 2019

(just to point out: the problem did not occur with php5, evidently the code paths are different there)

@chaosgrid
Copy link

I just had the same issue on php7.3 and Nextcloud 15.0.12. Installing php7.3-xml fixed it.

@flostyen
Copy link

flostyen commented Oct 21, 2019

I had the same issue on php7.0, ubuntu16.04 and Nextcloud 15.0.7. When running the update-script (/var/scripts/update.sh) of Nextcloud the issue occured. The following commands fixed it:

sudo add-apt-repository ppa:ondrej/php <-- caution, this adds the php-repo of Ondřej Surý to your system
sudo apt-get update
sudo apt-get install php7.2 mariadb-common php7.2-pgsql php7.2-xml php7.2-zip php7.2-mbstring php7.2-gd php7.2-curl
sudo systemctl restart apache2

@lucgiffon
Copy link

Doing apt-get install --reinstall php7.2-xml worked for me. I guess the installation was corrupted?

@JanisPlayer
Copy link
Contributor

sudo -u www-data php7.3 occ db:convert-filecache-bigint --no-interaction
If several php versions are installed, please select the correct php version.

@dhowe
Copy link

dhowe commented Apr 9, 2021

Same issue w php7.4

joshtrichards added a commit to joshtrichards/nc-server that referenced this issue Jun 16, 2023
Fixes nextcloud#2180
And prevents nextcloud#31473, nextcloud#23970, nextcloud#18610, nextcloud#15708

Avoids a 500 error and also gives a useful error message on the web interface if this module isn't installed, gets overlooked during a PHP upgrade, etc.

While we check for it later, it's too late for session.

Inspired by nextcloud#17163

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
joshtrichards added a commit to joshtrichards/nc-server that referenced this issue Jun 16, 2023
Fixes nextcloud#2180
And prevents nextcloud#31473, nextcloud#23970, nextcloud#18610, nextcloud#15708

Avoids a 500 error and also gives a useful error message on the web interface if this module isn't installed, gets overlooked during a PHP upgrade, etc.

While we check for it later, it's too late for session.

Inspired by nextcloud#17163

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
AndyScherzinger pushed a commit to joshtrichards/nc-server that referenced this issue Feb 27, 2024
Fixes nextcloud#2180
And prevents nextcloud#31473, nextcloud#23970, nextcloud#18610, nextcloud#15708

Avoids a 500 error and also gives a useful error message on the web interface if this module isn't installed, gets overlooked during a PHP upgrade, etc.

While we check for it later, it's too late for session.

Inspired by nextcloud#17163

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
skjnldsv pushed a commit to joshtrichards/nc-server that referenced this issue Aug 16, 2024
Fixes nextcloud#2180
And prevents nextcloud#31473, nextcloud#23970, nextcloud#18610, nextcloud#15708

Avoids a 500 error and also gives a useful error message on the web interface if this module isn't installed, gets overlooked during a PHP upgrade, etc.

While we check for it later, it's too late for session.

Inspired by nextcloud#17163

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

7 participants