eclipse-pdt / pdt

PHP Development Tools project (PDT)
https://eclipse.org/pdt
Eclipse Public License 2.0
188 stars 46 forks source link

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

Open hcgpalm opened 4 months ago

hcgpalm commented 4 months ago

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

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";
    ?>
  3. Create a new Server of type PHP Built-in Server
  4. Double-click the Server in the Servers view and click on Open launch configuration
  5. Under the Environment tab, add a variable with name 'FOO' and value 'bar' and click OK
  6. Add project 'p1' to the Server and Start it
  7. Access http://localhost:8180/p1/a.php

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