Open flack opened 12 years ago
That is correct. Please make sure midgard.http is Off for cli. This "unclear" and implicit behavior is done to make it possible to read config files with root permission before the privileges are dropped.
What I don't understand is why config files have to be read in the first place? Wouldn't it be better to do a lazy lookup, i.e. search for the file only when read_config or something similar is called?
I can of course change the config, but this requires further customization, since in Ubuntu (and Debian, too, I think), the php conf.d is a symlink, so by default all sapis use the same midgard config. It's not such a big deal, but yet another customization you have to remember to do when installing a new midgard server
This is the nature of PHP. We have to register classes when module is loaded. read_config() to open connection is one thing, register classes is another one.
Steps to reproduce:
php -v
from the command lineExpected Result:
Actual Result:
I should add that the new config file is not even referenced in php.ini or anything. But mgd2 seems to check all files in the folder for some reason, and if one of them is not readable, you can't run any php code until you fix this