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

[dev.icinga.com #10488] Use _ENV variables with built-in PHP webserver #2113

Closed
icinga-migration opened this issue Oct 29, 2015 · 3 comments

Comments

@icinga-migration
Copy link
Member

@icinga-migration icinga-migration commented Oct 29, 2015

This issue has been migrated from Redmine: https://dev.icinga.com/issues/10488

Created by mfrosch on 2015-10-29 12:55:53 +00:00

Assignee: elippmann
Status: Resolved (closed on 2015-12-21 10:10:03 +00:00)
Target Version: 2.1.1
Last Update: 2015-12-21 10:10:03 +00:00 (in Redmine)


(This feature helps dev and testing)

I'm using Phpstorm's run feature to run icingaweb2 via the PHP builtin webserver.

My problem is that I can't really set stuff like ICINGAWEB_CONFIGDIR and REMOTE_USER via the environment.

  1. PHP does not populate _ENV on php-cli per default

One can change this by setting:

php -d variables_order=EGPCS
  1. Icingaweb2 will not work with values from _ENV, and environment is only pushed to _SERVER in CGI and Apache modules

I will push a branch that helps with (2)

Here is a config example for Phpstorm:
builtinicingaweb2.png

Attachments

Changesets

2015-10-29 12:57:44 +00:00 by mfrosch b5fe576

Use _ENV data with PHP's builtin webserver

Note: this still requires PHP option:
variables_order=EGPCS

refs #10488

2015-12-18 12:26:38 +00:00 by aklimov 414a78d

Use getenv() instead of $_SERVER to get ICINGAWEB_CONFIGDIR

refs #10488

2015-12-18 12:46:34 +00:00 by aklimov fc8873e

Use getenv() instead of $_SERVER to get REMOTE_USER

refs #10488

2015-12-21 09:46:05 +00:00 by elippmann 720e022

Merge branch 'feature/use-_env-variables-with-built-in-php-webserver-10488'

resolves #10488
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Dec 18, 2015

Updated by elippmann on 2015-12-18 09:17:33 +00:00

  • Subject changed from _Use ENV variables with builtin PHP webserver to _Use ENV variables with built-in PHP webserver
  • Category changed from QA to Framework
  • Status changed from New to Assigned
  • Assigned to set to aklimov
  • Target Version set to 2.1.1

Hi Alex,

Could please test whether getenv('REMOTE_USER') and getenv('ICINGAWEB_CONFIG_DIR') works w/o setting the variables order?

Best,
Eric

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Dec 18, 2015

Updated by aklimov on 2015-12-18 13:18:30 +00:00

  • Status changed from Assigned to Feedback
  • Assigned to changed from aklimov to elippmann
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Dec 21, 2015

Updated by elippmann on 2015-12-21 10:10:03 +00:00

  • Status changed from Feedback to Resolved
  • Done % changed from 0 to 100

Applied in changeset 720e022.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.