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

libxml - compare against loaded version #612

Merged
merged 1 commit into from
Jul 28, 2016

Conversation

MorrisJobke
Copy link
Member

  • 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

@kasi45 Could you check your setup with this change? (I slightly modified the check, because in your scenario it luckily worked, but the comparision wasn't correct ;))

@nickvergessen @LukasReschke @rullzer Please review :)

The issue reported needed this to run Nextcloud on an older Qnap system, so I would vote for a backport. @karlitschek

@karlitschek
Copy link
Member

nice! please backport

@@ -833,7 +833,7 @@ public static function checkServer(\OCP\IConfig $config) {
}

if(function_exists('xml_parser_create') &&
version_compare('2.7.0', LIBXML_DOTTED_VERSION) === 1) {
LIBXML_LOADED_VERSION < 20700 ) {
$errors[] = array(
'error' => $l->t('libxml2 2.7.0 is at least required. Currently %s is installed.', [LIBXML_DOTTED_VERSION]),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOADED version here as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈 I didn't noticed that. Yes I will try to get a useful information in a dotted version here.

@kasi45
Copy link

kasi45 commented Jul 28, 2016

Thanks, work well!

only cosmetic - change:
'error' => $l->t('libxml2 2.7.0 is at least required. Currently %s is installed.', [LIBXML_LOADED_VERSION]),
to
'error' => $l->t('libxml2 2.7.0 is at least required. Currently %s is loaded.', [LIBXML_LOADED_VERSION]),

complement:
change output format "LIBXML_LOADED_VERSION" with stringoperation or regex to "x.x" example 20904 to 2.9

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

* 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 force-pushed the improve-xml-loaded-version-handling branch from 9193334 to 740349f Compare July 28, 2016 06:30
@MorrisJobke
Copy link
Member Author

I fixed the output.

@kasi45
Copy link

kasi45 commented Jul 28, 2016

@MorrisJobke
Thanks for the solution!
and I also learned something ;-)

@nickvergessen
Copy link
Member

Nasty math 🙈

👍

@LukasReschke
Copy link
Member

🙈 🙊 🙉
👍

@LukasReschke LukasReschke merged commit d6c6800 into master Jul 28, 2016
@LukasReschke LukasReschke deleted the improve-xml-loaded-version-handling branch July 28, 2016 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhanced setup check for libxml 2.7.0
5 participants