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

Enhanced setup check for libxml 2.7.0 #205

Closed
kasi45 opened this issue Jun 22, 2016 · 5 comments · Fixed by #612
Closed

Enhanced setup check for libxml 2.7.0 #205

kasi45 opened this issue Jun 22, 2016 · 5 comments · Fixed by #612
Labels
bug good first issue Small tasks with clear documentation about how and in which place you need to fix things in.

Comments

@kasi45
Copy link

kasi45 commented Jun 22, 2016

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

@MorrisJobke
Copy link
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?

@kasi45
Copy link
Author

kasi45 commented Jun 23, 2016

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

@MorrisJobke
Copy link
Member

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

@MorrisJobke MorrisJobke self-assigned this Jun 23, 2016
@MorrisJobke MorrisJobke added enhancement good first issue Small tasks with clear documentation about how and in which place you need to fix things in. labels Jun 23, 2016
MorrisJobke added a commit that referenced this issue Jul 27, 2016
* if the compiled in version is older than the loaded version Nextcloud doesn't work
* uses the loaded libxml version to check against

fixes #205
@MorrisJobke
Copy link
Member

Fix is in #612

@MorrisJobke MorrisJobke removed their assignment Jul 27, 2016
MorrisJobke added a commit that referenced this issue Jul 28, 2016
* if the compiled in version is older than the loaded version Nextcloud doesn't work
* uses the loaded libxml version to check against

fixes #205
MorrisJobke added a commit that referenced this issue Jul 28, 2016
* if the compiled in version is older than the loaded version Nextcloud doesn't work
* uses the loaded libxml version to check against

fixes #205
MorrisJobke added a commit that referenced this issue Jul 28, 2016
* if the compiled in version is older than the loaded version Nextcloud doesn't work
* uses the loaded libxml version to check against

fixes #205
@MorrisJobke MorrisJobke added this to the Nextcloud 11.0 milestone Jul 28, 2016
@MorrisJobke
Copy link
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
Labels
bug good first issue Small tasks with clear documentation about how and in which place you need to fix things in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants