NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
How to debug magento backend


Joined: 18 Oct 2006
Posts: 75
Reply with quote
I need to track down a problem I have in the admin (backend) of magento. The problem is that instead of the commonly used method of suppling paramaters via GET and POST, Magento uses pseudo folders after the index.php, so the url for the admin backend is index.php/admin. Magento then figures out the parms by inspecting the value in $_SERVER[REQUEST_URI]. All well and good, but how do I debug index.php/admin? I guess I can stop the index script at the first line and change the value of $_SERVER[REQUEST_URI] but this is a pain to do every time and it would be good to have the ability to set other Super Globals such as $_SERVER from the launch box somehow, or have an option in the launch box able to append a string to the file name.

TIA,
Nick.
View user's profileFind all posts by nickweaversSend private messageVisit poster's websiteYahoo Messenger


Joined: 18 Oct 2006
Posts: 75
Reply with quote
Looking at it further, it seems to be even more tedious to deal with because when the URI index.php/admin is decoded, a login form is rendered and when it is submitted you need to go back through index.php with the same URI of index.php/admin plus the login account and password stashed in $_POST. If you forget to update $_SERVER['REQUEST_URI'] back to index.php/admin at the breakpoint at the top of index.php again, you don't get the correct decoding that provides the route through userid/password verification, and you end up being shown the login form again.

Code:

http://example.com/magento/(index.php)/customer/account/index/
                      ^        ^           ^        ^     ^
                      |        |           |        |     |
                      |        |           |        |     ‘- Action
                      |        |           |        |     (indexAction())
                      |        |           |        |
                      |        |           |        ‘- Controller
                      |        |           |        (AccountController)
                      |        |           |
                      |        |           ‘- Module (frontName)
                      |        |
                      |        |
                      |        ‘- Optional
                      |
                      ‘-- URL prefix


I can't think of an easy way to handle this using the launch facilities PhpEd currently provides. If anyone else has figured out a way I would be very grateful to hear it.

TIA,
Nick
View user's profileFind all posts by nickweaversSend private messageVisit poster's websiteYahoo Messenger
How to debug magento backend
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