NextCloud -> TrueNAS: PHP is being weird

Greetings, i have an error on my nextcloud instance in truenas that is preventing me to upgrade it shows as follow:
PHP does not seem to be setup properly to query system environment variables. The test with getenv(“PATH”) only returns an empty response. Please check the installation documentation for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm.
Some app directories are owned by a different user than the web server one. This may be the case if apps have been installed manually. Check the permissions of the following app directories:
usr/local/www/nextcloud/apps-pkg/accessibility
etc…

First part i have not being able to fix seccond one after i did fixt it it came back here the weird stuff after i log back in to my server and try to edit the www .conf file it says i do not have nano installed and the second error came back.

at this point i have try what the manual suggest without being successful

any ideas are welcome …

used default plug in install on the true nas this is for my personal use and my family .

server:

Operating System: FreeBSD 12.2-RELEASE-p2 amd64
CPU: Intel® Atom™ CPU C3758 @ 2.20GHz (8 cores)
Memory: 32.00 GB
Server time: Tue Dec 15 01:14:57 PST 2020
Uptime: 3 days, 21 hours, 38 minutes, 23 seconds

Disk:
Files: 310994
Storages: 3 —> i have 5 10TB dont know why it says 3
Free Space: 25.8 TB

PHP:
Version: 7.4.13
Memory Limit: 1 GB
Max Execution Time: 3600
Upload max size: 20 GB

Database:
Type: mysql
Version: 5.7.32
Size: 126.9 MB