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

PHP Built-in Server does not pick up environment variables #272

Open
hcgpalm opened this issue Mar 22, 2024 · 0 comments
Open

PHP Built-in Server does not pick up environment variables #272

hcgpalm opened this issue Mar 22, 2024 · 0 comments
Labels

Comments

@hcgpalm
Copy link

hcgpalm commented Mar 22, 2024

Describe the bug
The PHP Build-in Server does not appear to pick up any environment variables added to the Launch Configuration.

Describe the eclipse environment
eclipse-php-2022-12-R
PHP Development Tools (PDT) 7.2.1.202112011741 org.eclipse.php.feature.group Eclipse PDT

Describe your system

  • OS: Fedora
  • Version 38

To Reproduce
Steps to reproduce the behavior:

  1. Create a PHP project 'p1'
  2. Create a file /a.php in 'p1' with the following content:
<?php
echo "Foo is a " . getenv("FOO") . "\n";
?>
  1. Create a new Server of type PHP Built-in Server
  2. Double-click the Server in the Servers view and click on Open launch configuration
  3. Under the Environment tab, add a variable with name 'FOO' and value 'bar' and click OK
  4. Add project 'p1' to the Server and Start it
  5. Access http://localhost:8180/p1/a.php

Expected behavior
Expected output: "Foo is a bar"
Actual output: "Foo is a"

@hcgpalm hcgpalm added the bug label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant