Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350405 - Incorrect default Launch URL when Run/Debug As PHP Web Page
Summary: Incorrect default Launch URL when Run/Debug As PHP Web Page
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP UI CLA
QA Contact: Ilina Stefanova CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-27 03:57 EDT by Toshihiro Izumi CLA
Modified: 2020-05-14 11:52 EDT (History)
1 user (show)

See Also:


Attachments
ad hoc patch (1.26 KB, text/plain)
2011-06-27 03:57 EDT, Toshihiro Izumi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toshihiro Izumi CLA 2011-06-27 03:57:28 EDT
Created attachment 198627 [details]
ad hoc patch

Run > Run As(or Debug As) > PHP Web Page
The default url in Launch URL is "http:/localhost/..."
It should be "http://localhost/..." of course.

This causes another problem.

1. Create new project "php1"
2. Create new file "file1.php"
3. Run > Run As > PHP Web Page
4. Modify URL such as "http:/localhost/file1.php" and run
5. Open run configuration for file1.php
 URL shows
 [http://localhost/][/localhost/file1.php]

5+. Run file1.php again
 Browser URL is "http://localhost/localhost/file1.php"

(This doesn't occur on Windows)
Comment 1 Zhongwei Zhao CLA 2011-06-29 00:09:20 EDT
hi Toshihiro,

thanks very much for your patch,I have a question can we change:
IPath url = new Path("/" + server.getPath());
to
IPath url = new Path("/");
Comment 2 Toshihiro Izumi CLA 2011-06-29 03:59:27 EDT
Of course because server.getPath() always returns "", and it is by design(server is restricted with http://hostname:port) now.
If the design of server representation won't be changed some day, server.getPath() is redundant apparently.
Thanks :)
Comment 3 Zhongwei Zhao CLA 2011-06-30 02:23:15 EDT
thanks for your explanation:)

I have applied your patch without any change,thanks again!
Comment 4 Kalin CLA 2011-07-28 10:05:26 EDT
Verified.
Closing...