The requested uri(/.env) cannot be processed by the script '/nextcloud/index.php')

Support intro

I’ve seen similar errors from much older versions of NC. Some have no solutions, some have solutions possibly related to apps that we are not using. Started seeing this after upgrading Nextcloud from version 24 to 25

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

The requested uri(/.env) cannot be processed by the script '/nextcloud/index.php')

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 25.0.1
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.5
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.4): 7.4.18

The issue you are facing:
The requested uri(/.env) cannot be processed by the script ‘/nextcloud/index.php’)

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

Steps to replicate it:

  1. Appears in the log sporadically
  2. I’ve seen similar errors from much older versions of NC. Some have no solutions, some have solutions possibly related to apps that we are not using. Started seeing this after upgrading Nextcloud from version 24 to 25

The output of your Nextcloud log in Admin > Logging:

[index] Error: Exception: The requested uri(/.env) cannot be processed by the script '/nextcloud/index.php') at <<closure>>

0. /var/www/html/nextcloud/lib/private/AppFramework/Http/Request.php line 759
   OC\AppFramework\Http\Request->getRawPathInfo()
1. /var/www/html/nextcloud/lib/base.php line 792
   OC\AppFramework\Http\Request->getPathInfo()
2. /var/www/html/nextcloud/lib/base.php line 1144
   OC::init()
3. /var/www/html/nextcloud/index.php line 34
   require_once("/var/www/html/nextcloud/lib/base.php")

GET /.env
from 95.214.235.205 at 2022-11-22T15:14:14+00:00

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

<?php
$CONFIG = array (
  'objectstore' => 
  array (
    'class' => '\\OC\\Files\\ObjectStore\\S3',
    'arguments' => 
    array (
      'bucket' => '',
      'autocreate' => true,
      'key' => '',
      'secret' => '',
      'region' => '',
      'use_ssl' => true,
      'use_path_style' => false,
    ),
  ),
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '',
  ),
  'datadirectory' => '',
  'dbtype' => 'pgsql',
  'version' => '25.0.1.1',
  'overwrite.cli.url' => 'https://',
  'dbname' => '',
  'dbhost' => '/var/run/postgresql',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'www-data',
  'dbpassword' => '',
  'installed' => true,
  'instanceid' => '',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => '1',
  'default_phone_region' => 'US',
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => 'smtp.office365.com',
  'mail_smtpport' => '587',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_domain' => '',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'trashbin_retention_obligation' => '15,30',
  'maintenance' => false,
  'theme' => '',
  'updater.release.channel' => 'stable',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_from_address' => 'accounts',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' => 
  array (
  ),

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

[Tue Nov 22 00:00:02.636680 2022] [mpm_prefork:notice] [pid 778] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
[Tue Nov 22 00:00:02.636704 2022] [core:notice] [pid 778] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 22 12:58:03.716792 2022] [php7:error] [pid 76868] [client 103.133.111.228:61868] script '/var/www/html/nextcloud/xmlrpc.php' not found or unable to stat
[Tue Nov 22 14:57:28.839491 2022] [php7:error] [pid 81522] [client 20.38.34.241:56884] script '/var/www/html/nextcloud/xmlrpc.php' not found or unable to stat
[Tue Nov 22 15:03:42.572242 2022] [php7:error] [pid 82011] [client 20.38.34.241:52637] script '/var/www/html/nextcloud/xmlrpc.php' not found or unable to stat

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE