You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In recent versions of PDT, a project workspace directory is naively used as the document root for the PHP Built-in Server.
I.e. the server starts a process like:
/usr/bin/php -S 127.0.0.1:8180 -t /home/joe/myworkspace/myphpproject
This breaks a lot of the WST Server functionality:
When the project Location differs from its Path (for example when you create the project using the option "Create project at existing location"), the project workspace directory doesn't actually contain the project files (just the metadata). Hence nothing is served.
If you add multiple php projects to a server, only one of them is actually served.
Run As->Run on Server on an object doesn't work even in the naive case as WST assumes a context root of localhost:port/project_name/ rather than localhost:port/.
PDT assumes that the project file structure exactly corresponds to the structure of the served documents. This is supposed to be defined by the Deployment Assembly (in WST terminology). Admittedly, there is no such thing in a PDT project, but in older versions of PDT it seems to be implicitly defined as the aggregate of the projects source folders.
I.e. if you had the files /src/a.php and /htdocs/b.html and both /src and /htdocs are defined as source folders, the files used to be served as /a.php and /b.html, but are now served as /src/a.php and /htdocs/b.html.
It appears that this works (more or less) fine in PDT 7 and is broken in PDT 8. More specifically:
Works:
PHP Development Tools (PDT) 7.2.1.202112011741 org.eclipse.php.feature.group Eclipse PDT
Broken:
PHP Development Tools (PDT) 8.1.0.202307170929 org.eclipse.php.feature.group Eclipse PDT
I'm pretty sure that issue #68 is at least partly to blame.
Describe the eclipse environment
Eclipse version: eclipse-php-2024-03-R
PHP Development Tools (PDT) 8.2.0.202311292129 org.eclipse.php.feature.group Eclipse PDT
Describe your system
OS: Fedora
Version 38
To Reproduce
Steps to reproduce the behavior:
Create PHP project 'p1'
Inside 'p1', create files /a/a.php and /b/b.php
Edit project properties of 'p1', under PHP Build Path, remove 'p1' and add 'p1/a' and 'p1/b'
Create PHP project 'p2'
Inside 'p2', create file /c/c.php
Edit project properties of 'p2', under PHP Build Path, remove 'p2' and add 'p2/c'
Right-click a.php, choose Run As...->Run on Server. Expect Eclipse to open a browser window showing a.php on URL http://localhost:8180/p1/a.php (this actually doesn't work in PDT 7 either).
The text was updated successfully, but these errors were encountered:
Describe the bug
In recent versions of PDT, a project workspace directory is naively used as the document root for the PHP Built-in Server.
I.e. the server starts a process like:
/usr/bin/php -S 127.0.0.1:8180 -t /home/joe/myworkspace/myphpproject
This breaks a lot of the WST Server functionality:
I.e. if you had the files /src/a.php and /htdocs/b.html and both /src and /htdocs are defined as source folders, the files used to be served as /a.php and /b.html, but are now served as /src/a.php and /htdocs/b.html.
It appears that this works (more or less) fine in PDT 7 and is broken in PDT 8. More specifically:
Works:
PHP Development Tools (PDT) 7.2.1.202112011741 org.eclipse.php.feature.group Eclipse PDT
Broken:
PHP Development Tools (PDT) 8.1.0.202307170929 org.eclipse.php.feature.group Eclipse PDT
I'm pretty sure that issue #68 is at least partly to blame.
Describe the eclipse environment
Eclipse version: eclipse-php-2024-03-R
PHP Development Tools (PDT) 8.2.0.202311292129 org.eclipse.php.feature.group Eclipse PDT
Describe your system
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The text was updated successfully, but these errors were encountered: