Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350405

Summary: Incorrect default Launch URL when Run/Debug As PHP Web Page
Product: z_Archived Reporter: Toshihiro Izumi <euthanasia_waltz>
Component: PDTAssignee: PHP UI <php.ui-inbox>
Status: CLOSED FIXED QA Contact: Ilina Stefanova <ilina.s>
Severity: normal    
Priority: P3 CC: kalin.a
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
ad hoc patch none

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...