Php mod_重写、XDebug、PDT、XAMPP和windowsxp的路径问题
我的mod_rewrite将accounts/create转换为index.php?folder=accounts&action=create,但pdt会忽略它,因此当我尝试启动php脚本调试会话时,我必须在文件字段中键入文件夹位置,pdt不接受 当PDT自动生成PHP网页调试会话的URL时,我转到,但是myframe在frameworks文件夹中,因此我得到一个404错误 当我选中断点时,取消选中自动生成,在URL中的myframe之前添加框架,在Advanced中设置Start Debug from并单击Debug,调试器不会在断点处停止 更新 在没有mod_重写的情况下作为PHP网页进行调试是可行的。使用mod_rewrite作为PHP网页进行调试不起作用。我正在使用以下配置Php mod_重写、XDebug、PDT、XAMPP和windowsxp的路径问题,php,mapping,path,Php,Mapping,Path,我的mod_rewrite将accounts/create转换为index.php?folder=accounts&action=create,但pdt会忽略它,因此当我尝试启动php脚本调试会话时,我必须在文件字段中键入文件夹位置,pdt不接受 当PDT自动生成PHP网页调试会话的URL时,我转到,但是myframe在frameworks文件夹中,因此我得到一个404错误 当我选中断点时,取消选中自动生成,在URL中的myframe之前添加框架,在Advanced中设置Start Debug
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 All Pages
.htaccess:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/?([^/]*)/?([^/]*)$ index.php?folder=$1&action=$2¶ms=$3 [L]
</IfModule>
php.ini:
zend_extension=“\xampp\php\ext\php\u xdebug.dll”
idekey=ECLIPSE\u xdebug
xdebug.profiler_enable=1
xdebug.remote\u enable=1
xdebug.remote_handler=“dbgp”
xdebug.remote\u host=“localhost”
xdebug.remote_mode=“req”
xdebug.remote_port=9000
开始->
控制面板->
防火墙->
例外情况->
添加端口->
姓名:
XDebug
端口号:
9000
窗口->
首选项->
PHP->
调试->
PHP调试器:
XDebug
服务器:
本地服务器
PHP可执行文件:
C:\xampp\php\php-cgi.exe
调试配置->
MyFrame网页->
服务器->
PHP服务器->
配置->
服务器->
姓名:
本地服务器
输入指向此服务器的文档根目录的URL:
http://localhost/frameworks
路径映射->
(服务器路径)http://localhost/frameworks/myframe/index.php
到
(文件系统)C:\xampp\htdocs\frameworks\myframe\index.php
(服务器路径)http://localhost/frameworks/myframe/index.php
到
(workspace)/myframe/index.php
文件:
/myframe/index.php
网址:
http://localhost/ 在左边
frameworks/myframe/index.php位于右侧
高级->
(选中)在浏览器中打开
(选中)调试所有页面
.htaccess:
重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^([^/]*)/?([^/]*)/?([^/]*)$index.php?文件夹=$1&action=$2¶ms=$3[L]
我以前在EclipsePDT中听说过这个问题。在这一点上,我很确定这是调试器中的一个bug?我也不认为XDebug是罪魁祸首。。但是,如果您认为这会有所帮助,可以尝试将其添加到.htaccess文件中:
php_flag xdebug.profiler_enable 1
php_value xdebug.profiler_output_dir /path/to/output_idr
php_value xdebug.profiler_output_name cachegrind.out.%t.%p
这样,您至少不必将XDebug GET变量添加到URL中
您是否尝试过手动键入要mod_rewrite创建的URL,并从中执行调试器?这应该是你的下一步,如果你还没有。祝你好运 我以前在EclipsePDT中听说过这个问题。在这一点上,我很确定这是调试器中的一个bug?我也不认为XDebug是罪魁祸首。。但是,如果您认为这会有所帮助,可以尝试将其添加到.htaccess文件中:
php_flag xdebug.profiler_enable 1
php_value xdebug.profiler_output_dir /path/to/output_idr
php_value xdebug.profiler_output_name cachegrind.out.%t.%p
这样,您至少不必将XDebug GET变量添加到URL中
您是否尝试过手动键入要mod_rewrite创建的URL,并从中执行调试器?这应该是你的下一步,如果你还没有。祝你好运 看一看,看一看