This is an experience I had last night. I created a test.php file with this text:
<?php
phpinfo();
?>
Then I ran that file via the browser. It told me all about the current settings. It also told me which php.ini it used, I thought.
Configuration File (php.ini) Path /usr/local/apache/conf/php.ini
However, no matter how much I edited this php.ini, nothing seemed to have effect. (Don’t forget to restart the Apache server after having changed php.ini.)
Finally I logged in in the qnap server as administrator and went to [Web Server]. There you will find a checkbox that enables you to edit PHP.INI. When viewing that file, I noticed that it was different from the one I had edited. After changing things in this one, the Apache too was restarted automatically, and YES now it all worked as expected.
Where does the qnap’s php.ini reside? The answer was also in the text produced by phpinfo(). I should have looked at the NEXT line. It says:
Loaded Configuration File /mnt/HDA_ROOT/.config/php.ini
The remaining question is why the loaded php.ini is a different one.