Resource icon

Scripted installation of Nextcloud 28 in iocage jail 2018-03-23

InGenetic

Contributor
Joined
Dec 18, 2013
Messages
183
Maybe the hash package wasn't required with Nextcloud 18. pkg install php73-hash.
really thanks mr.danb35,
now i can access to my nextcloud again .. ,

in my setting overview , there're notification like this :

Security & setup warnings
It's important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the linked documentation for more information.

There are some errors regarding your setup.
  • It was not possible to execute the cron job via CLI. The following technical errors have appeared:
    • PHP module HASH Message Digest Framework not installed. Please ask your server administrator to install the module.
  • Last background job execution ran 2 hours ago. Something seems wrong. Check the background job settings
  • This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them.
    • bcmath
Please double check the installation guides ↗, and check for any errors or warnings in the log.

Check the security of your Nextcloud over our security scan ↗.

what i have to do then ?

please more advice.
overview.JPG
 

InGenetic

Contributor
Joined
Dec 18, 2013
Messages
183
Hi mr.danb35 ,

i really realy thanks for your help .. btw Happy New Year , hope that u have a better new year.

Now, my nextcloud was running normally , without any notification now.

overview3.JPG
 

wavesswe

Dabbler
Joined
Dec 2, 2020
Messages
21
Hi! I need som help regarding memory_limit. i now get this

Allowed memory size of 134217728 bytes exhausted (tried to allocate 2363088 bytes) at /usr/local/www/nextcloud/lib/private/Files/Storage/Local.php#272

and my CRON has stoped woking and i belive its because of this as well.

I have set "memory_limit = 1G" and also tried with 1024M and looked thru all config files i can find and googled and tried adding to .htaccess as found regarding owncloud. but no luck.

i am using NC20 but started with this script a couple of moths ago and have always had this problem but now its starting to make problems by using NC.

please help
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
/usr/local/etc/php.ini or something in /usr/local/etc/php-fpm.d depending on the setup which I am not familiar with.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
tried adding to .htaccess as found regarding owncloud. but no luck.
.htaccess would help if I were using Apache as the webserver, but I'm not--I'm using Caddy instead.

The place to fix this is in /usr/local/etc/php.ini, but it defaults to 512 MB anyway, so I'm not sure why you'd be seeing this.
 
Joined
Jan 4, 2014
Messages
1,644
looked thru all config files i can find
/var/log/php-fpm.log may provide some clues. Failing that, have a look in /var/log/nextcloud.log to see if anything jumps out at you.
 

wavesswe

Dabbler
Joined
Dec 2, 2020
Messages
21
.htaccess would help if I were using Apache as the webserver, but I'm not--I'm using Caddy instead.

The place to fix this is in /usr/local/etc/php.ini, but it defaults to 512 MB anyway, so I'm not sure why you'd be seeing this.
Im am using Caddy as i set it up with your script. is there another config parameter to use in that case? it is the /usr/local/etc/php.ini i have been editing in.
 

wavesswe

Dabbler
Joined
Dec 2, 2020
Messages
21
Ok, som update. When i run
Code:
php -i
i get
Code:
memory_limit=1G
but when i run it as www,
Code:
sudo -u www php -i
Code:
memory_limit=128M
, so how to change for specific users? any one know?
 

G8One2

Patron
Joined
Jan 2, 2017
Messages
248
Wouldnt it be easier to just delete the jail, then reinstall? The script recognizes the old database and will complete a reinstall of the jail. Reinstalling the jail, should install the newest version of nextcloud along with all the PHP modules and everything else that goes with it. Seems like a simple answer to me? Perhaps its not though idk.....
 

wavesswe

Dabbler
Joined
Dec 2, 2020
Messages
21
Wouldnt it be easier to just delete the jail, then reinstall? The script recognizes the old database and will complete a reinstall of the jail. Reinstalling the jail, should install the newest version of nextcloud along with all the PHP modules and everything else that goes with it. Seems like a simple answer to me? Perhaps its not though idk.....


Maybe, i havent tried that but i have had this issue from start with the script so i dont think its related. but i have tried to add bot memory_limit and phpadmin_memory_limit in www.conf without success. i know if i override the memory from cli it works with that command, eg scan files.

so the value must be sitting in another file. when googleing I see alot of php/cli/php.ini but i dont have that file. am i supposed to?
 

wavesswe

Dabbler
Joined
Dec 2, 2020
Messages
21
Another thing a thought of is read permissions. Does www need read access to the conf and ini files?
 

G8One2

Patron
Joined
Jan 2, 2017
Messages
248
Another thing a thought of is read permissions. Does www need read access to the conf and ini files?

Folder permissions would be configured during jail creation. This isn't something you should need to modify, unless of course you manually changed to permissions for some odd reason
 

wavesswe

Dabbler
Joined
Dec 2, 2020
Messages
21
Folder permissions would be configured during jail creation. This isn't something you should need to modify, unless of course you manually changed to permissions for some odd reason
I know that but as I said I have had this problem from start so if that might be a solution. Should eg www be a part of group wheel that is the group of the ini and conf files?
 

G8One2

Patron
Joined
Jan 2, 2017
Messages
248
I would leave permissions at their default value. I dont think making permission changes is going to help you out. Likely to just cause further issues.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Should eg www be a part of group wheel that is the group of the ini and conf files?
I'm not sure what your issue is, but if you haven't done anything to change them, permissions aren't the issue. Where exactly are you seeing these error messages?
 

wavesswe

Dabbler
Joined
Dec 2, 2020
Messages
21
I'm not sure what your issue is, but if you haven't done anything to change them, permissions aren't the issue. Where exactly are you seeing these error messages?
Hi! in the logg tile inside the NC web gui. i also now saw that my test filed with PHP info was owned byt root. when i changed it to www i actually showed the correct values. so my problem is with the cli commands from NC. because thats where i get the 128M

i know from previusly when i do sudo -u www php -d memory_limit=1G occ files:scan it works but if i do it without the -d memory_limit=1G i quickly get memory exhausted
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Top