Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log a warning if user tries to change ShareDir in runtime #65

Open
bergie opened this issue Nov 2, 2011 · 1 comment
Open

Log a warning if user tries to change ShareDir in runtime #65

bergie opened this issue Nov 2, 2011 · 1 comment

Comments

@bergie
Copy link
Member

bergie commented Nov 2, 2011

Until #8 and #9 are fixed, the Midgard2 extension only loads MgdSchemas from ShareDir at start-up time. This means that either:

  • PHP is started with a specified config file (midgard.configuration_file INI setting), in which case the ShareDir from that is used
  • PHP follows the MIDGARD_ENV_GLOBAL_SHAREDIR directive
  • The global /usr/share/midgard2 directory is used

Now, if user later tries to open a Midgard connection with open(filename) or open_config(object) that has a different ShareDir set than what Midgard is already using (see the list above), we should log a warning about this. Otherwise users easily think their setting is working an may get into trouble.

@bergie
Copy link
Member Author

bergie commented Nov 2, 2011

The warning could be something like Tried to change Midgard ShareDir from /original/path to /new/path in runtime. This has no effect. Use the MIDGARD_ENV_GLOBAL_SHAREDIR environment variable for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant