owncloud plugin missing posix and memcache

Status
Not open for further replies.

prophoto

Explorer
Joined
Jul 27, 2015
Messages
61
I don't remember how I fixed it but when attempting to install owncloud 8.1 on 9.3 I was getting a memcache error and php was missing posix.so. I was able to copy posix.so from freenas into the jail.

The memcache error:
An unhandled exception has been thrown:
OC\HintException: [0]: Missing memcache class \OC\Memcache\APCu for local cache
(Is the matching PHP module installed and enabled ?)

To fix the memcache error I copied php.ini-production to php.ini inside of /usr/pbi/owncloud-amd64/etc and added apc.enable_cli=1 to the php.ini file so I could get console.php to run on the CLI. The owncloud cron job needs apcu also.

Is there something that can be done to fix these issues for future installs so others don't have to jump through these hoops?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949

prophoto

Explorer
Joined
Jul 27, 2015
Messages
61
I did find that via google search which lead me to the final answer, but as stated there was no php.ini file in oc/etc. I had to copy it from php.ini-production. Is there a reason why a php.ini file is not being created? Is it possible to at least add it to some documentation somewhere?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I did find that via google search which lead me to the final answer, but as stated there was no php.ini file in oc/etc. I had to copy it from php.ini-production. Is there a reason why a php.ini file is not being created? Is it possible to at least add it to some documentation somewhere?
This is how php is always installed on freebsd. It runs fine without the php.ini, it just uses the default values.

Documentation for php on freebsd or for this plugin specifically?
 

prophoto

Explorer
Joined
Jul 27, 2015
Messages
61
I would think on the plugin level. FYI I also had to install sudo to run console.php from the CLI.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I would think on the plugin level. FYI I also had to install sudo to run console.php from the CLI.
It would be nice for me to have a spot to document some specific stuff about plugins. Might look into adding a section to the FreeNAS docs in the future. If you want to pursue this right away feel free to make a request on bugs.freenas.org

I'm not sure what console.php does. What were you running it for?
 

prophoto

Explorer
Joined
Jul 27, 2015
Messages
61
I have about 5-7TB of files on my FreeNAS box which I want to sync with a remote workstation and about 300GB to my laptop. Using console.php is supposed to allow adding all files already on the server (added via owncloud external storage app) to the owncloud db. Unfortunately it runs out of memory after a while event if I add -d memory_limit=256M. Right now I am syncing one of the 3 drives (smallest, only about 200GB) from the workstation to the FreeNAS box which owncloud sync app says it will take another 36 hours. I wish there was a workaround because 95% of those files are already on the FreeNAS share.
 

prophoto

Explorer
Joined
Jul 27, 2015
Messages
61
Another question, would it be at all advantageous to use an external mysql server from the owncloud jail? Does FreeNAS have one running already? Might be easier to upgrade OC if the whole jail takes a crap...plus from what I read its better to move away from sqlite for large datasets. What is your take?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I have about 5-7TB of files on my FreeNAS box which I want to sync with a remote workstation and about 300GB to my laptop. Using console.php is supposed to allow adding all files already on the server (added via owncloud external storage app) to the owncloud db. Unfortunately it runs out of memory after a while event if I add -d memory_limit=256M. Right now I am syncing one of the 3 drives (smallest, only about 200GB) from the workstation to the FreeNAS box which owncloud sync app says it will take another 36 hours. I wish there was a workaround because 95% of those files are already on the FreeNAS share.
are you sure you aren't supposed to be using the occ command? I have a feeling, console.php was replaced by that.
Anyway, you shouldn't need to run this as root (using sudo), unless your files aren't writeable by the 'www' user. Which owncloud requires.

Any commandline work done with owncloud should be done using the 'www' user.
Code:
chsh -s /bin/sh www
cd /usr/pbi/owncloud-amd64/www/ownloud
/usr/pbi/owncloud-amd64/bin/php ./occ
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Another question, would it be at all advantageous to use an external mysql server from the owncloud jail? Does FreeNAS have one running already? Might be easier to upgrade OC if the whole jail takes a crap...plus from what I read its better to move away from sqlite for large datasets. What is your take?
Since you're syncing 200GB+ of files I highly suggest you use a mysql backed install.
https://forums.freenas.org/index.php?threads/how-to-owncloud-using-nginx-php-fpm-and-mysql.17786/
 

prophoto

Explorer
Joined
Jul 27, 2015
Messages
61
With separate mysql and nginx/php jails or just one? Any preference either way? Does FreeNAS already have a mysql server running?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
With separate mysql and nginx/php jails or just one? Any preference either way? Does FreeNAS already have a mysql server running?
If you follow the guide I linked nginx/php/mysql is installed in the same jail. I don't see a reason to separate these out unless your hosting multiple applications. No, FreeNAS uses sqlite.
 
Status
Not open for further replies.
Top