NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
CodeIgniter and PhpED


Joined: 09 Jul 2007
Posts: 7
Reply with quote
I'm using CodeIgniter and I ran into a problem while trying to debug.

I found the page that explains how to modify CI to accept GET parameters here: http://forums.zuggsoft.com/forums/weblog_entry.php?p=139820, but I don't think that will solve my problem. I am using the PhpED IE toolbar and as far as I can tell it uses cookies, so it avoids conflicts with CI's inability to retrieve the the GET request for DBGSESSID.

My problem is that when I try to debug a page from the IE toolbar I get this error message:

Then it just opens index.php, steps through the code and then stops debugging.

I realize that it's a project mapping problem, but I'm not sure how to solve it. I've tried many different project settings, CI settings, etc, but haven't been able to make any progress, so I thought I would post here.

As you're probably aware, CodeIgniter is an MVC framework, so it maps request URIs to controllers and methods like this: /localhost/controller_name/method_name or /localhost/products/view

I think this is what's causing the problem. Anyway, before I go further here are my current project settings:



Also. I'm using the clean URL settings in CodeIgniter (without the /index.php/). I tried both ways, and still got the same problem. I've tried many combinations and still can't get it to map to the project. Maybe someone else has had the same problem? I tried searching the forum, but none of the CodeIgniter solutions worked (I'll recheck them again this morning in case I overlooked something)... maybe it's the mod_rewrite rules?

Quote:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|captcha|css|js|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]


Ps. I'm using WAMP server locally on WinXP SP3, but I'm using IE6 (I keep the old version so I can view IE6 javascript and css errors, etc. I can upgrade IE if necessary, though.)

Thanks,
Steve
View user's profileFind all posts by dslbyzipSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
I realize that it's a project mapping problem, but I'm not sure how to solve it.


No, this is no a project mapping problem.
As you noted, with CodeIgniter and some other php frameworks all the requests are handled through a dispatcher. It means that the URLs are rewritten and therefore can not be mapped to the files. More precisely, all the URL should be mapped to just one file (the dispatcher).
With your example, the IDE tried to find a file corresponding to http://localhost/index.php/processors/index URL and didn't succeed. IDE only wanted to make sure that current (active) project has any relation to the URL you're debugging. This check can't be done with rewritten or remapped URL. Does it mean that there is a problem? I think no. Just ignore the warning or check "Don't show this message".

On the other hand, I'll try to find a better way to match the URLs against current project.

FYI, real mapping error would happen if you tried to run a file that is not in the project. For example try to change remote root directory to C:\wamp\www . In this case your index.php file (C:\wamp\www\cidemo\index.php) will be in /cidemo/index.php relative directory and therefore will be mapped to C:\wamp\www\cidemo\ + \cidemo\index.php => C:\wamp\www\cidemo\cidemo\index.php => not in the project / directory does not exist. The sampe will happen if you set project root directory to anywhere else but C:\wamp\www\cidemo.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 09 Jul 2007
Posts: 7
Reply with quote
Thanks for the clarification, Dmitri! I haven't had time to check it yet, but I think the problem was that I only had index.php and a few other files open when I tried to debug. I will try it again with all of the files open to see if that works. Thanks.
View user's profileFind all posts by dslbyzipSend private message
CodeIgniter and PhpED
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic