Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2008
    Posts
    241
    Plugin Contributions
    0

    Default Debugging of Classes?

    When I try to debug my payment class using a debugger I get an error 403. That happens with every class inside module payments, so my question is, where in the store tree, can the payment class be placed during testing, to avoid, the permission problems?

    I made a test an created a bogus class inside there, and had the same permission error.

    Something like

    <?php class foo {



    }
    ?>
    <?php
    $classes = get_declared_classes();
    foreach ($classes as $class) {
    echo $class . "<br />";?>
    }
    ?>

    That simple code, had the same problem ...
    so to debug any recommendations as to where place the code?

  2. #2
    Join Date
    Jul 2008
    Posts
    241
    Plugin Contributions
    0

    Default Re: Debugging of Classes?

    I moved my class outside the store subfolder to test it in a sandbox and there I am getting some feedback, the problem is how can I check $_SESSION['cart'] to check if the session is still there, as the class is outside ZC tree, and is returning an error? ... when I put it back, I got a blank screen and nothing else, no errors of any kind!

  3. #3
    Join Date
    Jan 2004
    Posts
    58,249
    Blog Entries
    3
    Plugin Contributions
    106

    Default Re: Debugging of Classes?

    If you're getting blank screens when writing your own custom code, turn on error-reporting in PHP so you can see your PHP errors.

    If you're getting blank screens inside Zen Cart, you can turn on error reporting to log errors to files by using the utility mentioned in this FAQ on Blank Pages: http://tutorials.zen-cart.com/index.php?article=82

    Or look up error_reporting on www.php.net
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Jul 2008
    Posts
    241
    Plugin Contributions
    0

    Default Re: Debugging of Classes?

    Quote Originally Posted by DrByte View Post
    If you're getting blank screens when writing your own custom code, turn on error-reporting in PHP so you can see your PHP errors.

    If you're getting blank screens inside Zen Cart, you can turn on error reporting to log errors to files by using the utility mentioned in this FAQ on Blank Pages: http://tutorials.zen-cart.com/index.php?article=82

    Or look up error_reporting on www.php.net
    Thanks Dr. Byte! I will try it out, my php.ini is set to E_ALL so .. it should display something, but when I tried to debug it using a php ide debugger, inside ZC , I also got an error with permissions ...

    I hope this tool helps troubleshooting it better ...

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    1,935
    Plugin Contributions
    20

    Default Re: Debugging of Classes?

    Quote Originally Posted by icecold View Post
    I ... the problem is how can I check $_SESSION['cart'] to check if the session is still there ...
    The Super Globals Plus add-on allows you to view the contents of most everything, including the $_SESSION variables.

  6. #6
    Join Date
    Jul 2008
    Posts
    241
    Plugin Contributions
    0

    Default Re: Debugging of Classes?

    Quote Originally Posted by lat9 View Post
    The Super Globals Plus add-on allows you to view the contents of most everything, including the $_SESSION variables.
    This is interesting but does it work with 1.3.8a?

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    1,935
    Plugin Contributions
    20

    Default Re: Debugging of Classes?

    Quote Originally Posted by icecold View Post
    This is interesting but does it work with 1.3.8a?
    Yes, and 1.3.9b as well.

  8. #8
    Join Date
    Jul 2008
    Posts
    241
    Plugin Contributions
    0

    Default Re: Debugging of Classes?

    Quote Originally Posted by lat9 View Post
    Yes, and 1.3.9b as well.
    Great!
    Thanx!

 

 

Similar Threads

  1. zen cart IDE and debugging
    By joemind in forum General Questions
    Replies: 3
    Last Post: 2 Sep 2008, 02:30 AM
  2. Debugging a Notice
    By asdf in forum General Questions
    Replies: 2
    Last Post: 10 May 2007, 11:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •