Skip to content

Enhanced setup check for libxml 2.7.0 #205

Description

@kasi45

Nextcloud version: 9.0.50 (stable)

the loaded libxml is version 2.9.2 but nextcloud can not start.

example:

[~] # /mnt/ext/opt/apache/bin/php -i|grep libXML
libXML support => active
libXML Compiled Version => 2.6.30
libXML Loaded Version => 20902
libXML streams => enabled

https://github.com/nextcloud/server/blob/stable9/lib/private/util.php

if(function_exists('xml_parser_create') &&
    version_compare('2.7.0', LIBXML_DOTTED_VERSION) === 1) {
    $errors[] = array(
        'error' => $l->t('libxml2 2.7.0 is at least required. Currently %s is installed.', [LIBXML_DOTTED_VERSION]),
        'hint' => $l->t('To fix this issue update your libxml2 version and restart your web server.')
    );
}

There is no check which version is loaded!
"LIBXML_DOTTED_VERSION" is not equal "LIBXML_LOADED_VERSION"

if i edit "/lib/private/util.php"
and change "LIBXML_DOTTED_VERSION" to "LIBXML_LOADED_VERSION" nextcloud started.

I have a Qnap NAS. There is only limited possible to install other software.
so it will be also on devices from other manufacturers.

sorry, my english is to bad. i hope you understand me

Activity

  1. MorrisJobke commented on Jun 23, 2016

    @MorrisJobke
    Member

    I just checked this. I can't find any documentation for this constant in http://php.net/manual/en/libxml.constants.php

    But a local test showed, that it is available:

        [LIBXML_DOTTED_VERSION] => 2.9.4
        [LIBXML_LOADED_VERSION] => 20904
    

    It looks like the compiled version is older and a newer one is loaded. We also then need to adjust the if statement to something like:

    if(LIBXML_LOADED_VERSION >= 20700) {

    @LukasReschke Does this makes sense? Should there be an additional check?

  2. kasi45 commented on Jun 23, 2016

    @kasi45
    Author

    "LIBXML_LOADED_VERSION" is a new global constant since PHP 5.3
    http://php.net/manual/en/migration53.global-constants.php

  3. MorrisJobke commented on Jun 23, 2016

    @MorrisJobke
    Member

    Thanks :) I will then try to fix this :)

  4. self-assigned this
    on Jun 23, 2016
  5. added
    good first issueSmall tasks with clear documentation about how and in which place you need to fix things in.
    on Jun 23, 2016
  6. added a commit that references this issue on Jul 27, 2016
    9193334
  7. MorrisJobke commented on Jul 27, 2016

    @MorrisJobke
    Member

    Fix is in #612

  8. removed their assignment
    on Jul 27, 2016
  9. added a commit that references this issue on Jul 28, 2016
    740349f
  10. added 2 commits that reference this issue on Jul 28, 2016
    1913419
    066ac4f
  11. added this to the Nextcloud 11.0 milestone on Jul 28, 2016
  12. MorrisJobke commented on Jul 28, 2016

    @MorrisJobke
    Member

    fixed in master, stable10 and stable9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issueSmall tasks with clear documentation about how and in which place you need to fix things in.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions