![](/img/trans.png)
[英]CodeIgniter configuration with mod_rewrite, xampp and windows
[英]path problem with mod_rewrite, XDebug, PDT, XAMPP and Windows XP
我的mod_rewrite將account / create轉換為index.php?folder = accounts&action = create,但pdt忽略了它,因此當我嘗試啟動PHP Script調試會話時,我必須在file字段中輸入文件夾位置,而pdt卻沒有接受。
當PDT自動為PHP網頁調試會話生成URL時,我轉到http://localhost/myframe/index.php?XDEBUG_SESSION_START = ECLIPSE_DBGP&KEY = 12569067976875 ,但是myframe在frameworks文件夾中,因此出現404錯誤。
當我檢查斷點時,取消選中“自動生成”,在URL中的myframe之前添加框架,從“高級”中的http:// localhost / frameworks / myframe / accounts / create設置“開始調試”,然后單擊“調試”,調試器不會在該斷點處停止。
更新
在沒有mod_rewrite的情況下作為PHP網頁進行調試是可行的。 使用mod_rewrite作為PHP網頁進行調試無法正常工作。 我正在使用以下配置。
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>
我以前在Eclipse PDT中聽說過此問題。 在這一點上,我很確定這是調試器中的錯誤? 我也不認為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並從那里執行調試器? 如果還沒有的話,那應該是您的下一步。 祝好運!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.