Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Debugging files NOT under the document root
Debugging files NOT under the document root [message #16457] Fri, 20 April 2007 10:49 Go to next message
Emil Ivanov is currently offline Emil IvanovFriend
Messages: 12
Registered: July 2009
Junior Member
For improved security it's a good practice to put back-end source files
NOT under the document root, but somewhere else.

I want to know is it possible to debug those files with PDT/XDebug and
the new path mapper and how should it be configured.

Regards,
Emil Ivanov
Re: Debugging files NOT under the document root [message #16475 is a reply to message #16457] Fri, 20 April 2007 13:24 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
It should be possible and depending on how you create your setup, you may or may not
need to use a path mapper.

Whenever a script is executing within PHP, XDebug will know its complete path.
In order for PDT to be able to
a) show the correct script when editing
b) send breakpoints to PHP/XDebug

either
1) the script being executed by PHP is the same physical file contained within your workspace
2) we need some way to map a relationship between the physical file PHP is executing and the
physical copy of the file that exists in the PDT workspace

If you have a setup that reflects 1), then you don't need a path mapper
If you have a setup that reflects 2), then you need a path mapper.

The sample path mapper I provided will map a single directory path for the web server scripts
(it doesn't have to be your htdocs location, even though it is labeled like that) to a single path within your workspace.

So you need to work out how you directory of scripts (not in htdocs) will map
to the copies contained in your workspace based on the above.

If you have scripts in htdocs and outside of htdocs, it may still be possible to
to use my sample mapper to debug scripts in both places if you require.

Dave Kelsey


Emil Ivanov wrote:
> For improved security it's a good practice to put back-end source files
> NOT under the document root, but somewhere else.
>
> I want to know is it possible to debug those files with PDT/XDebug and
> the new path mapper and how should it be configured.
>
> Regards,
> Emil Ivanov
Re: Debugging files NOT under the document root [message #16510 is a reply to message #16475] Fri, 20 April 2007 16:18 Go to previous message
Emil Ivanov is currently offline Emil IvanovFriend
Messages: 12
Registered: July 2009
Junior Member
Thanks for the quick response. I got it running - and...
Ima tell ya, that thing rocks. Thanks again and keep up the good work.

Dave Kelsey wrote:
> It should be possible and depending on how you create your setup, you
> may or may not
> need to use a path mapper.
>
> Whenever a script is executing within PHP, XDebug will know its complete
> path.
> In order for PDT to be able to
> a) show the correct script when editing
> b) send breakpoints to PHP/XDebug
>
> either
> 1) the script being executed by PHP is the same physical file contained
> within your workspace
> 2) we need some way to map a relationship between the physical file PHP
> is executing and the
> physical copy of the file that exists in the PDT workspace
>
> If you have a setup that reflects 1), then you don't need a path mapper
> If you have a setup that reflects 2), then you need a path mapper.
>
> The sample path mapper I provided will map a single directory path for
> the web server scripts
> (it doesn't have to be your htdocs location, even though it is labeled
> like that) to a single path within your workspace.
>
> So you need to work out how you directory of scripts (not in htdocs)
> will map
> to the copies contained in your workspace based on the above.
>
> If you have scripts in htdocs and outside of htdocs, it may still be
> possible to
> to use my sample mapper to debug scripts in both places if you require.
>
> Dave Kelsey
Previous Topic:Please help vote for the Mylar/PDT bridge.
Next Topic:[Semi-OT] Is it possible to select all text between braces?
Goto Forum:
  


Current Time: Wed Apr 24 18:48:16 GMT 2024

Powered by FUDForum. Page generated in 0.03390 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top