Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » path problem with mod_rewrite, XDebug, PDT, XAMPP and Windows XP
path problem with mod_rewrite, XDebug, PDT, XAMPP and Windows XP [message #494379] Fri, 30 October 2009 13:42 Go to next message
No real name is currently offline No real nameFriend
Messages: 5
Registered: October 2009
Junior Member
My mod_rewrite turns accounts/create into index.php?folder=accounts&action=create, but pdt ignores it, so when I try to start a PHP Script debug session, I have to type a folder location in the file field and pdt doesn't accept.

When PDT auto generates the URL for the PHP Web Page debug session, I go to http://localhost/myframe/index.php?XDEBUG%5FSESSION%5FSTART= ECLIPSE%5FDBGP&KEY=12569067976875, but myframe is in the frameworks folder, so I get a 404 error.

When I check a breakpoint, uncheck Auto Generate, add frameworks before myframe in URL, set Start Debug from http://localhost/frameworks/myframe/accounts/create in Advanced and click Debug, the debugger doesn't stop at the breakpoint.

[Updated on: Fri, 30 October 2009 14:00]

Report message to a moderator

Re: path problem with mod_rewrite, XDebug, PDT, XAMPP and Windows XP [message #494418 is a reply to message #494379] Fri, 30 October 2009 14:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dkel50.hotremovemail.com

The problem might be to do with path mapping. In the launch
configuration you need to specify the php file that will be invoked when
the specific URL in the launch configuration is invoked.

so whatever file is really invoked when you specify
http://localhost/frameworks/myframe/accounts/create

should be set to the file that exists in your workspace.

Alternatively try using firefox xdebughelper and Remote Session Initiation.

See http://www.eclipse.org/pdt/documents/XDebugGuideForPDT2.0.pd f

for more info

Dave Kelsey



On 30/10/09 13:42, pedbessa@hotmail.com wrote:
> When I use a PHP Script debug session with mod_rewrite, eclipse asks me
> to start from a file location, but /myframe/accounts/create is a folder
> location and my mod_rewrite turns all folder locations into file
> locations, but my PHP Script debug session doesn't care.
>
> When PDT auto generates the URL for the PHP Web Page debug session, I go
> to
> http://localhost/myframe/index.php?XDEBUG%5FSESSION%5FSTART= ECLIPSE%5FDBGP&KEY=12569067976875,
> but myframe is in the frameworks folder, so I get a 404 error.
>
> When I check a breakpoint, uncheck Auto Generate, add frameworks before
> myframe in URL, set Start Debug from
> http://localhost/frameworks/myframe/accounts/create in Advanced and
> click Debug, the debugger doesn't stop at the breakpoint.
Re: path problem with mod_rewrite, XDebug, PDT, XAMPP and Windows XP [message #494465 is a reply to message #494379] Fri, 30 October 2009 18:22 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 5
Registered: October 2009
Junior Member
the configurations

On php.ini are
zend_extension = "\xampp\php\ext\php_xdebug.dll"
xdebug.idekey=ECLIPSE_XDEBUG
xdebug.profiler_enable=1
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_host="localhost"
xdebug.remote_mode="req"
xdebug.remote_port=9000

My index.php files are at
C:\xampp\htdocs\frameworks\myframe\index.php in Windows
http://localhost/frameworks/myframe/index.php in xampp
/myframe/index.php in eclipse

On Debug Configurations -> PHP Web Page -> PHP Server -> Configure => Server is
Enter the URL that points to the document root of this server:
http://localhost/frameworks

On Debug Configurations -> PHP Web Page -> PHP Server -> Configure => Path Mapping are
first map
http://localhost/frameworks/myframe/index.php
to
/myframe/index.php
second map
http://localhost/frameworks/myframe/index.php
to
C:\xampp\htdocs\frameworks\myframe\index.php

On Debug Configurations -> PHP Web Page -> MyFrame Web Page are
File:
/myframe/index.php
URL:
(Auto Generate is unchecked)
http://localhost/ by the left
/frameworks/myframe/account/create by the right

On Window -> Preferences -> Debug -> Installed Debugger -> Xdebug -> Configure is
Accept Remote Session (JIT)
Prompt


the bugs

Checking Auto Generate makes
http://localhost/ by the left
and
/frameworks/myframe/index.php by the right
appear and unchecking adds
/frameworks
to the beginning of the URL by the right

When I visit http://localhost/frameworks/myframe/account/create, I can see the stack trace, but it doesn't stop at breakpoints.


How to solve this problem?

[Updated on: Fri, 30 October 2009 23:32]

Report message to a moderator

Re: path problem with mod_rewrite, XDebug, PDT, XAMPP and Windows XP [message #494497 is a reply to message #494379] Fri, 30 October 2009 21:34 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 5
Registered: October 2009
Junior Member
Now, it says "Launching : waiting for XDebug session" forever!

[Updated on: Fri, 30 October 2009 23:33]

Report message to a moderator

Re: path problem with mod_rewrite, XDebug, PDT, XAMPP and Windows XP [message #494514 is a reply to message #494379] Sat, 31 October 2009 00:16 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 5
Registered: October 2009
Junior Member
Debugging as PHP Web Page without mod_rewrite is working. Debugging as PHP Web Page with mod_rewrite isn't working. I'm using the following configuration.

php.ini:
zend_extension = "\xampp\php\ext\php_xdebug.dll"
xdebug.idekey=ECLIPSE_XDEBUG
xdebug.profiler_enable=1
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_host="localhost"
xdebug.remote_mode="req"
xdebug.remote_port=9000

Start ->
Control Panel ->
Firewall ->
Exceptions ->
Add Port ->
Name:
XDebug
Port number:
9000

Window ->
Preferences ->
PHP ->
Debug ->
PHP Debugger:
XDebug
Server:
localhost
PHP Executables:
C:\xampp\php\php-cgi.exe

Debug Configurations ->
MyFrame Web Page ->
Server ->
PHP Server ->
Configure ->
Server ->
Name:
localhost
Enter the URL that points to the document root of this server:
http://localhost/frameworks

Path Mapping ->
(serverpath) http://localhost/frameworks/myframe/index.php
to
(filesystem) C:\xampp\htdocs\frameworks\myframe\index.php

(serverpath) http://localhost/frameworks/myframe/index.php
to
(workspace) /myframe/index.php

File:
/myframe/index.php

URL:
http://localhost/ by the left
frameworks/myframe/index.php by the right

Advanced ->
(checked) Open in Browser
(checked) Debug

.htaccess:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/?([^/]*)/?([^/]*)$ index.php?folder=$1&action=$2&params=$3 [L]
</IfModule>

[Updated on: Fri, 06 November 2009 22:50]

Report message to a moderator

Re: path problem with mod_rewrite, XDebug, PDT, XAMPP and Windows XP [message #494515 is a reply to message #494379] Sat, 31 October 2009 00:18 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 5
Registered: October 2009
Junior Member
This forum doesn't support indenting!

[Updated on: Sat, 31 October 2009 23:57]

Report message to a moderator

Re: path problem with mod_rewrite, XDebug, PDT, XAMPP and Windows XP [message #498512 is a reply to message #494465] Tue, 17 November 2009 10:18 Go to previous message
Eclipse UserFriend
Originally posted by: dkel50.hotremovemail.com

Your path mappings are wrong. You have used urls which is not correct.
The path mappings map physical locations so you need to specify physical
locations on the remote server, not urls such as
http://localhost/frameworks/myframe/index.php

Regards
Dave Kelsey

On 30/10/09 18:22, pedbessa@hotmail.com wrote:
> the configuration
>
> My index.php files are at
> C:\xampp\htdocs\frameworks\myframe\index.php in Windows
> http://localhost/frameworks/myframe/index.php in xampp
> /myframe/index.php in eclipse
>
> Debug Configurations -> PHP Web Page -> PHP Server -> Configure => Server
> Enter the URL that points to the document root of this server:
> http://localhost/frameworks
>
> Debug Configurations -> PHP Web Page -> PHP Server -> Configure => Path
> Mapping
> first map is
> http://localhost/frameworks/myframe/index.php
> to
> /myframe/index.php
> second map is
> http://localhost/frameworks/myframe/index.php
> to
> C:\xampp\htdocs\frameworks\myframe\index.php
>
> At Debug Configurations -> PHP Web Page -> MyFrame Web Page are
> File:
> /myframe/index.php
> URL:
> (Auto Generate is unchecked)
> http://localhost/ by the left
> /frameworks/myframe/accounts/create by the right
>
>
> the bugs
>
> Checking Auto Generate makes http://localhost/ by the left
> and
> /frameworks/myframe/index.php by the right
> appear and unchecking adds
> /frameworks
> to the beginning of the URL by the right
>
> http://localhost/frameworks/myframe/accounts/created is loaded, but the
> debugger doesn't stop at the breakpoint
Previous Topic:Re: Eclipse Plugins how to use?
Next Topic:What is current stable version?
Goto Forum:
  


Current Time: Sun May 16 16:20:43 GMT 2021

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

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

Back to the top