EDIT: Please note since QNAP QTS 4.1.x and ownCloud 7.0.2 the following steps aren’t working anymore. A new post will follow.
This post comes as a following to the original Installing and using ownCloud on QNAP hardware post, and serves to users in the process of doing both clean installs and upgrades.
First of all, I need to explain the need for this post: Live was peachy, until someones decided to upgrade ownCloud to version 6.x on any QNAP hardware, both ARM or x86 based. When this upgrade is performed, the user is presented with a white screen, caused by the server crashing spectacularly.
The whole symptoms are the following:
- perform either a clean install on QNAP hardware following the ownCloud guidelines;
- try to load the ownCloud address once, greeted with a blue scree saying: “upgrading, press refresh”;
- on the refresh the user is presented with a clueless white screen;
- while checking apache logs (check this is on how to enable Apache logs on QNAP), a fearsome line appears:
PHP Fatal error: Class 'PM;\b\xc8R9\bon\Memory' not found in /share/MD0_DATA/Qweb/owncloud_current/lib/base.php on line 342, referer: http://x.x.x.x/owncloud/index.php/apps/files
The think is, the file actually exists but does not contain the string PM;\b\xc8R9\bon\Memory .
After some investigation, this issue appears to demonstrate this is a widespread problem with QNAP hardware, and was caused by eAccelerator being used. Also, it isn’t enough to simply disable eAccelerator, as the QNAP admin interface simply becomes unusable. So a solution needs to be found, which locally disables eAccelerator, but leaves it enabled for QNAP admin tool.
- Login to the QNAP device through SSH
- Enable .htaccess usage on Apache. To do this you need to create a new Apache configuration file:
And add the following commands:
<Directory /owncloud> Options FollowSymLinks AllowOverride none php_flag eaccelerator.enable 0 php_flag eaccelerator.optimizer 0 Order deny,allow Deny from all </Directory>
- Reference this new configuration file on Apache main configuration file. To do this, edit Apache configuration file:
and add the following line at the end of the file:
Finally, restart Apache and ownCloud is now capable of being installed and used, without impacting the admin tool.