I just installed a bare boned Drupal 10 locally. and Windows 10 with PHP 8.1.14
I set the private file path as follows:
$settings['file_private_path'] = $app_root . '/../private';
Its path shows correct "/admin/config/media/file-system". Now when I went to Drupal status page, it shows
Warning: file_exists(): Unable to find the wrapper "private" - did you forget to enable it when you configured PHP? in Drupal\Component\FileSecurity\FileSecurity::writeFile() (line 152 of core\lib\Drupal\Component\FileSecurity\FileSecurity.php).
I applied the security code for the .htaccess file, but still showing this
Then I added a code snippet in the theme preprocess function like this:
if(file_exists('private://.htaccess')) {
print 'I found it<br>';
}
else {
print 'It does not exists<br>';
}
It always shows file does not exists. But of course file is there.
I did not face this issue in previous Drupal versions. Btw, in my php.ini allow_url_fopen is On and opessl is enabled.
Anyone there to help me to fix this issue?