Nohanswurstgesicht wrote:It took some time, till I figured out, that my Owncloud installation needs a newer libxml version since version 9. Any news on that?
Thanks!
libxml Upgrade
Re: libxml Upgrade
-
- Experience counts
- Posts: 1346
- Joined: Sun Aug 14, 2011 5:13 am
Re: libxml Upgrade
All participants on this thread are advised to contact QNAP helpdesk with a feature request on that: https://helpdesk.qnap.com
-
- Experience counts
- Posts: 1346
- Joined: Sun Aug 14, 2011 5:13 am
Re: libxml Upgrade
-->
johnripper wrote:All participants on this thread are advised to contact QNAP helpdesk with a feature request on that: https://helpdesk.qnap.com
-
- New here
- Posts: 4
- Joined: Wed Dec 19, 2012 7:15 am
Re: libxml Upgrade
Ok, so since the libxml2.2.6.30 is from 2008 and qnap is not willing to provide any upgrade for it, here is the quick and dirty solution.
My Qnap 569L is running fine with this fix on QTS4.2.1 build 20160601, however I urge you to:
1. have a backup in case everything fails,
2. have someone who can boot the nas with a different operatingsystem to fix if something fails completely,
3. have some BASIC knowledge in linux shells so that you can debug on your own.
What we are going to do:
1. simply replace the libxml2.so.2.6.30 with the one from the medialibrary (version 2.9.2 at the moment)
2. fix owncloud 9.0.2 to look for the actual loaded libxml, not the one apache was compiled against.
3. fix some warning that tells us we fiddled with the owncloud core.
IMPORTANT:
THIS WON'T SURVIVE A FIRMWARE UPDATE. So you HAVE to do it again EVERYTIME you update. No guarantee that this will work with any future qnap updateS!
THIS WON'T SURVIVE A OWNCLOUD UPDATE. So you HAVE to do it again EVERYTIME you update owncloud. No guarantee that this will work with any future owncloud updates!
(But the bug is already reportet and they probably will fix it in the next update so that you don't have to fiddle with the owncloud core anyways).
Step 1:
Replace libxml2:
log in to your nas via ssh, issue the following codes after another:
Check if the libxml2 is correctly loaded by issuing the following command:
If everything is ok, it should look like this:
Patch the util.php from owncloud:
You should already have downloaded and extracted owncloud 9.0.2 somewhere on your nas. You should also know the path to that. is perhaps also necessary.
There is a bug in the current owncloud (9.0.2) which does only check the libxml2 version used to compile the apache, not which version is loaded.
Replace the "..." with the actual path to your ownloud. If you used the standard installation, this path SHOULD work.
Now open the owncloud website and do the upgrade/install (or put some values in the config.php or whatever it needs to get owncloud running)
Step 3:
Patch the checksum warnings:
This is not necessary, but it's just annoying when logging in as admin and owncloud complains about the wrong checksum on the util.php.
Since owncloud is using code signing to prevent malicious software to modify the core libraries, it's perfectly legit for the warning to appear.
Altering the signature file will also not help, since this file is also checksumed.
So the only way to get rid of the warning is to set the branch of owncloud to something other than stable. We will set it to "custom":
This should be it. Owncloud 9.0.2 on QTS 4.2.1 20160601 should be ready to rumble.
-Acid
My Qnap 569L is running fine with this fix on QTS4.2.1 build 20160601, however I urge you to:
1. have a backup in case everything fails,
2. have someone who can boot the nas with a different operatingsystem to fix if something fails completely,
3. have some BASIC knowledge in linux shells so that you can debug on your own.
What we are going to do:
1. simply replace the libxml2.so.2.6.30 with the one from the medialibrary (version 2.9.2 at the moment)
2. fix owncloud 9.0.2 to look for the actual loaded libxml, not the one apache was compiled against.
3. fix some warning that tells us we fiddled with the owncloud core.
IMPORTANT:
THIS WON'T SURVIVE A FIRMWARE UPDATE. So you HAVE to do it again EVERYTIME you update. No guarantee that this will work with any future qnap updateS!
THIS WON'T SURVIVE A OWNCLOUD UPDATE. So you HAVE to do it again EVERYTIME you update owncloud. No guarantee that this will work with any future owncloud updates!
(But the bug is already reportet and they probably will fix it in the next update so that you don't have to fiddle with the owncloud core anyways).
Step 1:
Replace libxml2:
log in to your nas via ssh, issue the following codes after another:
Code: Select all
cd /usr/lib
mv libxml2.so.2.6.30 /share/CACHEDEV1_DATA/.qpkg/
cp /usr/local/medialibrary/lib/libxml2.so.2.9.2 .
ln -sf libxml2.so.2.9.2 libxml2.so
ln -sf libxml2.so.2.9.2. libxml2.so.2
/etc/init.d/Qthttpd.sh restart
Code: Select all
/usr/local/apache/bin/php -i | grep libXML
Step 2:libXML support => active
libXML Compiled Version => 2.6.30
libXML Loaded Version => 20902
libXML streams => enabled
Patch the util.php from owncloud:
You should already have downloaded and extracted owncloud 9.0.2 somewhere on your nas. You should also know the path to that.
Code: Select all
chmod -R httpdusr:administrators /share/Web/owncloud
There is a bug in the current owncloud (9.0.2) which does only check the libxml2 version used to compile the apache, not which version is loaded.
Code: Select all
sed -i 's/LIBXML_DOTTED_VERSION/LIBXML_LOADED_VERSION/g' /share/Web/owncloud/lib/private/util.php
Now open the owncloud website and do the upgrade/install (or put some values in the config.php or whatever it needs to get owncloud running)
Step 3:
Patch the checksum warnings:
This is not necessary, but it's just annoying when logging in as admin and owncloud complains about the wrong checksum on the util.php.
Since owncloud is using code signing to prevent malicious software to modify the core libraries, it's perfectly legit for the warning to appear.
Altering the signature file will also not help, since this file is also checksumed.
So the only way to get rid of the warning is to set the branch of owncloud to something other than stable. We will set it to "custom":
Replace the path to owncloud with your actual path as above.sed -i 's/stable/custom/g' /share/Web/owncloud/version.php
This should be it. Owncloud 9.0.2 on QTS 4.2.1 20160601 should be ready to rumble.
-Acid
-
- New here
- Posts: 2
- Joined: Wed Jul 06, 2016 9:21 am
Re: libxml Upgrade
I was submitting a ticket. QNAP Support told me they want to investigate the problem and eventually consider it in a coming software release...
-
- Know my way around
- Posts: 122
- Joined: Tue Jul 01, 2014 5:50 pm
Re: libxml Upgrade
Lip service
-
- First post
- Posts: 1
- Joined: Sun Jun 21, 2015 4:47 am
Re: libxml Upgrade
Thank you!
Worked fine for Owncloud 9.0.2 on my TVS-671
After Upgrade to Owncloud 9.1.0 the util.php is at another place. Now the file is placed at owncloud/lib/private/legacy/util.php
So you have to write a line like this:
Worked fine for Owncloud 9.0.2 on my TVS-671
Code: Select all
There is a bug in the current owncloud (9.0.2) which does only check the libxml2 version used to compile the apache, not which version is loaded.
Code: Select all
sed -i 's/LIBXML_DOTTED_VERSION/LIBXML_LOADED_VERSION/g' /share/Web/owncloud/lib/private/util.php
So you have to write a line like this:
Code: Select all
sed -i 's/LIBXML_DOTTED_VERSION/LIBXML_LOADED_VERSION/g' /share/Web/owncloud/lib/private/legacy/util.php
-
- New here
- Posts: 5
- Joined: Tue Feb 05, 2013 3:19 pm
Re: libxml Upgrade
CAUTION: Before applying the workaround described here read the whole post!
The old libxml2 can be found in /usr/lib. The relevant directory entries are as follows:
libxml2.so -> libxml2.so.2
libxml2.so.2 -> libxml2.so.2.6.30
libxml2.so.2.6.30
My workaround (execute commands in SSH shell):
(1) Find a more recent version of the libxml2 library on your system
(2) Copy the more recent version into /usr/lib (in my case the path was /mnt/ext/opt/medialibrary/lib/libxml2.so.2.9.2)
(3) Change the symlink pointing to the old library to have it point to the newer version
After that, I was able to install Nextcloud 10.
I also haven't noticed anything else in the system broken after the modification.
However: I'm not sure about the implications this might have on the overall system – probably some software running on the NAS depends on the older libxml2 library?
In case you encounter problems after applying this workaround, just set the symlink from step (3) to the original state again:
Thanks for sharing your experience here and for comments/improvements!
The old libxml2 can be found in /usr/lib. The relevant directory entries are as follows:
libxml2.so -> libxml2.so.2
libxml2.so.2 -> libxml2.so.2.6.30
libxml2.so.2.6.30
My workaround (execute commands in SSH shell):
(1) Find a more recent version of the libxml2 library on your system
Code: Select all
find / -name libxml*
Code: Select all
cp /mnt/ext/opt/medialibrary/lib/libxml2.so.2.9.2 /usr/lib
Code: Select all
rm libxml2.so.2
ln -s libxml2.so.2.9.2 libxml2.so.2
I also haven't noticed anything else in the system broken after the modification.
However: I'm not sure about the implications this might have on the overall system – probably some software running on the NAS depends on the older libxml2 library?
In case you encounter problems after applying this workaround, just set the symlink from step (3) to the original state again:
Code: Select all
ln -s libxml2.so.2.6.30 libxml2.so.2
Re: libxml Upgrade
thanks, but qnap has been migrated to nextcloud, so a libxml2 is no longer required.QPeterQ wrote:CAUTION: Before applying the workaround described here read the whole post!
The old libxml2 can be found in /usr/lib. The relevant directory entries are as follows:
libxml2.so -> libxml2.so.2
libxml2.so.2 -> libxml2.so.2.6.30
libxml2.so.2.6.30
My workaround (execute commands in SSH shell):
(1) Find a more recent version of the libxml2 library on your system(2) Copy the more recent version into /usr/lib (in my case the path was /mnt/ext/opt/medialibrary/lib/libxml2.so.2.9.2)Code: Select all
find / -name libxml*
(3) Change the symlink pointing to the old library to have it point to the newer versionCode: Select all
cp /mnt/ext/opt/medialibrary/lib/libxml2.so.2.9.2 /usr/lib
After that, I was able to install Nextcloud 10.Code: Select all
rm libxml2.so.2 ln -s libxml2.so.2.9.2 libxml2.so.2
I also haven't noticed anything else in the system broken after the modification.
However: I'm not sure about the implications this might have on the overall system – probably some software running on the NAS depends on the older libxml2 library?
In case you encounter problems after applying this workaround, just set the symlink from step (3) to the original state again:Thanks for sharing your experience here and for comments/improvements!Code: Select all
ln -s libxml2.so.2.6.30 libxml2.so.2
-
- New here
- Posts: 5
- Joined: Wed Jul 27, 2016 8:58 pm
Re: libxml Upgrade
Hi,
sorry, the prosed workaround did not work for me (TS412). After exchanging the libxml the complete webserver did not work properly (even the administration website).
What was meant by
Regards,
Christoph
sorry, the prosed workaround did not work for me (TS412). After exchanging the libxml the complete webserver did not work properly (even the administration website).
What was meant by
as far as I found out, there was only a bugfix in nextcloud to correctly compare against the loaded lib, not only the compiled....thanks, but qnap has been migrated to nextcloud, so a libxml2 is no longer required.
Regards,
Christoph
-
- Getting the hang of things
- Posts: 87
- Joined: Tue Feb 09, 2016 4:07 pm
Re: libxml Upgrade
Do you have any news about this upgrade ? Still on 8.2.X branch because of this old lib
TS-251+ 4Go - RAID 1 Seagate 3To - Eaton 3S 550
-
- First post
- Posts: 1
- Joined: Sun Jan 10, 2016 7:01 am
Re: libxml Upgrade
Is there any news since i have same problem because of old version of libxml !!!
Still waiting for QNAP-Team response ....
Still waiting for QNAP-Team response ....
-
- Getting the hang of things
- Posts: 87
- Joined: Tue Feb 09, 2016 4:07 pm
Re: libxml Upgrade
I don't think there is any news :/
But a small script with Step 1 of the solution of AcidBurns87, execute it after any QTS update and you are fine, you can use the last version of NextCloud. It's the best option to deal with until QNAP change the default lib.
But a small script with Step 1 of the solution of AcidBurns87, execute it after any QTS update and you are fine, you can use the last version of NextCloud. It's the best option to deal with until QNAP change the default lib.
TS-251+ 4Go - RAID 1 Seagate 3To - Eaton 3S 550
Re: libxml Upgrade
qnap will, from my point of view, never upgrade libxml2, but only discontinue owncloud.Mikiya wrote:I don't think there is any news :/
But a small script with Step 1 of the solution of AcidBurns87, execute it after any QTS update and you are fine, you can use the last version of NextCloud. It's the best option to deal with until QNAP change the default lib.
-
- First post
- Posts: 1
- Joined: Sun Nov 02, 2014 2:01 am
Re: libxml Upgrade
I have the same problem running baikal (caldav / carddav server). It needs a newer libxml than the 2.6.30 that is used by php on QNAP. I'd really appreciate a FW-Upgrade with a recent libxml2.
Update:
Update:
- The latest libxml as of today is 2.9.4
- 2.6.30 was released back in 2008. That's more than 8 years ago!
- The list of known security vulnerabilities in libxml2 is long