I am working with a standard user without administrative rights.
I have installed PHP 7.3.8 manually inside
C:Program FilesPHP on Windows 10.
Afterwards i installed composer 2.0.12. Composer complained, that the openssl extension is not loaded.
I checked everything and finally noticed, that the php.ini is not loaded in CLI mode.
So i added the PHPRC environment variable with the value
C:Program FilesPHPphp.ini and rebooted. Did not work. Checked that with:
php -c "C:Program FilesPHPphp.ini" --ini Configuration File (php.ini) Path: C:WINDOWS Loaded Configuration File: (none) Scan for additional .ini files in: (none) Additional .ini files parsed: (none)
Then i tried to add the appropriate windows registry keys like explained here: https://www.php.net/manual/de/configuration.file.php
It also did not help.
So i simply tried to load the file directly by executing:
php -c "C:Program FilesPHPphp.ini" --ini
It still did not work.
Then i created a hardlink inside
C:Windowsphp.ini that points to
Finally i copied the original file
C:Program FilesPHPphp.ini to
C:Windowsphp.ini and executed
php -c "C:Windowsphp.ini" --ini
And it finally worked:
Configuration File (php.ini) Path: C:WINDOWS Loaded Configuration File: C:Windowsphp.ini Scan for additional .ini files in: (none) Additional .ini files parsed: (none)
Now it became clear, that this is related to access rights. And yes – as an administrator the file did load from inside the Program Files directory.
My Question: As a standard user i have read and execution rights. Why is that not sufficient? What additional rights are required?
Source: Windows Questions