Nextcloud PHP Enviorment Variable Problem

Nextcloud version: 12.0.5
Operating system and version : Debian 8.10
Apache or nginx version: nginx 1.12.2
PHP version : 7.1.13

The issue you are facing:
Today I reinstalled my nextcloud and now it’s spawning an error that system enviorment variables cant be read. And that getenv (“PATH”) returns an empty anwser.

But that’s does not make much sense: When I run

sudo -u www-data printenv PATH 

it returns


Also in the poolconfig the following is set:

 env[PATH] = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

That’s why I am pretty much surprised by this error… it just does not make any sense…

Is this the first time you’ve seen this error? (Y/N): Y

The output of your Nextcloud log in Admin > Logging:

No error

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'XXX',
  'passwordsalt' => 'XXX',
  'secret' => 'XXX',
  'trusted_domains' => 
  array (
    0 => 'XXX',
  'datadirectory' => '/var/www/XXX',
  'overwrite.cli.url' => 'XXX',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'XXX',
  'dbhost' => 'localhost',
  'dbport' => '',
'dbtableprefix' => 'XXX',
  'mysql.utf8mb4' => true,
  'dbuser' => 'XXX',
  'dbpassword' => 'XXX',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_smtpmode' => 'smtp',
'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpsecure' => 'tls',
  'mail_smtpauth' => 1,
  'mail_from_address' => 'cloud',
  'mail_domain' => 'XXX',
  'mail_smtphost' => '',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'XXX',
  'mail_smtppassword' => 'XXX',

The output of your Apache/nginx/system log in /var/log/____:

nothing there

Would be glad if anybody knows what have broken it… :slight_smile:

Are you configuring the command line version of php or the mod_php version/nginx fastcgi version?

I am configuring the fastcgi Version, not the cli version.

Restarted fastcgi?

Yeah. Multiple times. Interestingly the error was gone this morning. I somehow think the Nextcloud needed some time…