Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1
    Join Date
    Jun 2008
    Posts
    35
    Plugin Contributions
    0

    Default Lost my Admin Panel

    I was trying to install mods to activate PayPal Pro and evidently made some mistakes. I tried to restore everything using backup copies of files, but in the process have completely lost access to my admin panel. I get a blank screen when I type in the admin URL. I've read through everything I can find on the forums regarding losing the admin panel (including http://www.zen-cart.com/content.php?124), but nothing seems to help. Here is what my Debug file in the cache directory says:

    [29-Dec-2013 19:05:10] PHP Warning: Invalid argument supplied for foreach() in /home1/databasename/public_html/includes/templates/template_default/templates/tpl_modules_products_quantity_discounts.php on line 93

    When I look at the file /includes/templates/template_default/templates/tpl_modules_products_quantity_discounts.php, here's what I see:

    92 <?php
    93 foreach($quantityDiscounts as $key=>$quantityDiscount) {
    94 ?>
    95 <td align="center"><?php echo $quantityDiscount['show_qty'] . '<br />' . $currencies->display_price($quantityDiscount['discounted_price'], zen_get_tax_rate($products_tax_class_id)); ?></td>
    96 <?php
    97 $disc_cnt++;
    98 if ($discount_col_cnt == $disc_cnt /*&& !($key == sizeof($quantityDiscount))*/) {
    99 $disc_cnt = 0;
    100 ?>
    101 </tr><tr>
    102 <?php
    103 }
    104 }

    It is entirely possible that this was added by a coder we had many years ago, but this hasn't changed since we first implemented Zen Cart in 2009, so it has worked, but isn't now. The only thing I can imagine is that it has to do with the open brace "{" but I don't know why or what to do about it. I've included lines of code above that include the closing brace in line 104.

    Anybody got any ideas?

    Thanks in advance!

  2. #2
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,732
    Plugin Contributions
    27

    Default Re: Lost my Admin Panel

    comparing your file to my stock code i see your line:
    98 if ($discount_col_cnt == $disc_cnt /*&& !($key == sizeof($quantityDiscount))*/) {

    and my line:
    98 if ($discount_col_cnt == $disc_cnt && !($key == sizeof($quantityDiscount))) {
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

  3. #3
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,751
    Plugin Contributions
    22

    Default Re: Lost my Admin Panel

    Quote Originally Posted by markgrigsby View Post
    [29-Dec-2013 19:05:10] PHP Warning: Invalid argument supplied for foreach() in /home1/databasename/public_html/includes/templates/template_default/templates/tpl_modules_products_quantity_discounts.php on line 93
    PHP Warnings don't cause blank screens, it would show "php fatal error" if that was causing your blank screen. I don't think this is causing your problems.

    Are there any other error logs?

  4. #4
    Join Date
    Jun 2008
    Posts
    35
    Plugin Contributions
    0

    Default Re: Lost my Admin Panel

    The only other log I can find that might relate to the admin panel has a whole bunch of cfgkey statements with the last one being

    {s:6:"cfgkey";s:32:"MODULE_PAYMENT_PAYFLOW_DEBUGGING";s:8:"cfgvalue";s:3:"Off";} }

    One of the things we (me and PayPal technical rep) were doing just before we had this problem was implementing PayFlow Pro. It seems odd that the log file ends with the statement above. Maybe the problem is with PayFlow and I should back those modifications out to try to get the admin panel back.

    What do you think?

  5. #5
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Lost my Admin Panel

    Quote Originally Posted by markgrigsby View Post
    The only other log I can find that might relate to the admin panel has a whole bunch of cfgkey statements with the last one being

    {s:6:"cfgkey";s:32:"MODULE_PAYMENT_PAYFLOW_DEBUGGING";s:8:"cfgvalue";s:3:"Off";} }

    One of the things we (me and PayPal technical rep) were doing just before we had this problem was implementing PayFlow Pro. It seems odd that the log file ends with the statement above. Maybe the problem is with PayFlow and I should back those modifications out to try to get the admin panel back.

    What do you think?
    You say error log "ends" with something, but the error is what is at the beginning not the end. Error occurs, is logged and then sometimes other things continue to process, albeit unsuccessfully or with warnings. As time moves on more information is added to the end of the log.

    Also, would want to check your host's error logs in case something has been logged outside of ZC's control. Also, if you just implemented/activated some new file(s), those files may not have been "successfully" uploaded initially and only now that they are active in the flow they may be causing a problem.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Jun 2008
    Posts
    35
    Plugin Contributions
    0

    Default Re: Lost my Admin Panel

    1. I checked the error log from my hosting company and there are no entries for my IP address in that file.
    2. I checked the RAW Access Log file from my hosting company for my IP address and found the following related to my trying to log in to my admin panel:

    my.ip.add.ress - - [30/Dec/2013:20:36:49 -0700] "GET /myadminpaneldirectory/login.php HTTP/1.1" 200 4330 "-" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36"

    and then

    my.ip.add.ress - - [30/Dec/2013:20:37:10 -0700] "-" 408 4084 "-" "-"

    I'm not sure what either of these mean!

    3. The error log in my cache folder starts off with the following (this is line 1 in the file):

    a:732:{i:0;a:2:{s:6:"cfgkey";s:10:"STORE_NAME";s:8:"cfgvalue";s:26:"Discount Embroidery Supply";}i:1;a:2:{s:6:"cfgkey";s:11:"STORE_OWNER";s:8:"cfgvalue";s:22:"Mark and Susan Grigsby";}i:2;a:2:{s:6:"cfgkey";s:13:"STORE_COUNTRY";s:8:"cfgvalue";s:3:"223";}i :3;a:2:{s:6:"cfgkey";s:10:"STORE_ZONE";s:8:"cfgvalue";s:2:"13";}i:4;a:2:{s:6:"cf gkey";s:22:"EXPECTED_PRODUCTS_SORT";s:8:"cfgvalue";s:4:"desc";}i:5;a:2:{s:6:"cfg key";s:23:"EXPECTED_PRODUCTS_FIELD";s:8:"cfgvalue";s:13:"date_expected";}i:6;a:2 :{s:6:"cfgkey";s:29:"USE_DEFAULT_LANGUAGE_CURRENCY";s:8:"cfgvalue";s:5:"false";} i:7;a:2:{s:6:"cfgkey";s:25:"LANGUAGE_DEFAULT_SELECTOR";s:8:"cfgvalue";s:7:"Defau lt";}i:8;a:2:{s:6:"cfgkey";s:27:"SEARCH_ENGINE_FRIENDLY_URLS";s:8:"cfgvalue";s:5 :"false";}i:9;a:2:{s:6:"cfgkey";s:12:"DISPLAY_CART";s:8:"cfgvalue";s:5:"false";} i:10;a:2:{s:6:"cfgkey";s:32:"ADVANCED_SEARCH_DEFAULT_OPERATOR";s:8:"cfgvalue";s: 3:"and";}i:11;a:2:{s:6:"cfgkey";s:18:"STORE_NAME_ADDRESS";s:8:"cfgvalue";s:173:" Discount Embroidery Supply

    The cfgkey statement I posted earlier is on line 15, but line 15 is very, very long. Interestingly enough, there are a bunch of unnumbered blank lines after the statement I posted earlier, but these lines are not numbered. Then line 16 to line 114 are all blank, but the lines are numbered by the code editor.

    I'm going to try to backout the PayPal PayFlow code, but I sure don't want to mess up my customers being able to checkout on my website.

    Please let me know if you have other ideas!

    Thanks!

  7. #7
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Lost my Admin Panel

    Quote Originally Posted by markgrigsby View Post
    1. I checked the error log from my hosting company and there are no entries for my IP address in that file.
    2. I checked the RAW Access Log file from my hosting company for my IP address and found the following related to my trying to log in to my admin panel:

    my.ip.add.ress - - [30/Dec/2013:20:36:49 -0700] "GET /myadminpaneldirectory/login.php HTTP/1.1" 200 4330 "-" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36"

    and then

    my.ip.add.ress - - [30/Dec/2013:20:37:10 -0700] "-" 408 4084 "-" "-"

    I'm not sure what either of these mean!

    3. The error log in my cache folder starts off with the following (this is line 1 in the file):

    a:732:{i:0;a:2:{s:6:"cfgkey";s:10:"STORE_NAME";s:8:"cfgvalue";s:26:"Discount Embroidery Supply";}i:1;a:2:{s:6:"cfgkey";s:11:"STORE_OWNER";s:8:"cfgvalue";s:22:"Mark and Susan Grigsby";}i:2;a:2:{s:6:"cfgkey";s:13:"STORE_COUNTRY";s:8:"cfgvalue";s:3:"223";}i :3;a:2:{s:6:"cfgkey";s:10:"STORE_ZONE";s:8:"cfgvalue";s:2:"13";}i:4;a:2:{s:6:"cf gkey";s:22:"EXPECTED_PRODUCTS_SORT";s:8:"cfgvalue";s:4:"desc";}i:5;a:2:{s:6:"cfg key";s:23:"EXPECTED_PRODUCTS_FIELD";s:8:"cfgvalue";s:13:"date_expected";}i:6;a:2 :{s:6:"cfgkey";s:29:"USE_DEFAULT_LANGUAGE_CURRENCY";s:8:"cfgvalue";s:5:"false";} i:7;a:2:{s:6:"cfgkey";s:25:"LANGUAGE_DEFAULT_SELECTOR";s:8:"cfgvalue";s:7:"Defau lt";}i:8;a:2:{s:6:"cfgkey";s:27:"SEARCH_ENGINE_FRIENDLY_URLS";s:8:"cfgvalue";s:5 :"false";}i:9;a:2:{s:6:"cfgkey";s:12:"DISPLAY_CART";s:8:"cfgvalue";s:5:"false";} i:10;a:2:{s:6:"cfgkey";s:32:"ADVANCED_SEARCH_DEFAULT_OPERATOR";s:8:"cfgvalue";s: 3:"and";}i:11;a:2:{s:6:"cfgkey";s:18:"STORE_NAME_ADDRESS";s:8:"cfgvalue";s:173:" Discount Embroidery Supply

    The cfgkey statement I posted earlier is on line 15, but line 15 is very, very long. Interestingly enough, there are a bunch of unnumbered blank lines after the statement I posted earlier, but these lines are not numbered. Then line 16 to line 114 are all blank, but the lines are numbered by the code editor.

    I'm going to try to backout the PayPal PayFlow code, but I sure don't want to mess up my customers being able to checkout on my website.

    Please let me know if you have other ideas!

    Thanks!
    The above list of information does not appear to be an "error" log, at least not one made by ZenCart... The first my.ip.address entry indicates with the 200 that that particular load was successful. The 408 error implies that the system timed out... How much data do you have in your cache directory? Mostly wondering how many files? I have seen once before where I had too many files in my cache directory and couldn't complete the login process, and would actually get a timeout warning.

    As far as paypal processing, the typically accepted methods of payment accepted through ZenCart are PayPal express and PayPal Standard/IPN (depending on how it is listed/identified). Pick a time when there are few to no clients on the site to do thiis work, otherwise copy things to a local computer/test site to see if/how the problem could be resolved.

    BTW, upon looking at the above a little more, the records may be from ZenCart; however, they sure seem ambiguous...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Jun 2008
    Posts
    35
    Plugin Contributions
    0

    Default Re: Lost my Admin Panel

    My cache directory is purged every night - I have a cron job that deletes everything in the cache directory every day. So, that's not the problem.

    For PayPal processing, they actually have a product called PayFlow which replaces Authorize.net, PayPal Express, PayPal Standard/IPN and PayPal Payments Pro. I think Payments Pro requires Express, but right now I'm not sure about anything. I can tell you that we are saving lots by switching from a wholesale processor in combination with Authorize.net to everything being done by PayPal.

    Hopefully, things settle down a little and we can do some work over New Years.

    If you think of anything else, I'm wide open to suggestions!

  9. #9
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Lost my Admin Panel

    Quote Originally Posted by markgrigsby View Post
    My cache directory is purged every night - I have a cron job that deletes everything in the cache directory every day. So, that's not the problem.

    For PayPal processing, they actually have a product called PayFlow which replaces Authorize.net, PayPal Express, PayPal Standard/IPN and PayPal Payments Pro. I think Payments Pro requires Express, but right now I'm not sure about anything. I can tell you that we are saving lots by switching from a wholesale processor in combination with Authorize.net to everything being done by PayPal.

    Hopefully, things settle down a little and we can do some work over New Years.

    If you think of anything else, I'm wide open to suggestions!
    So, without removing anything from the server, I might try to create another admin directory (different named folder and not admin) and put together at least the new/temp admin directory that way. Once created and functional (albeit needing a changed admin/includes/configure.php file) I would then download both directories for comparison and troubleshooting.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Lost my Admin Panel

    Quote Originally Posted by markgrigsby View Post
    3. The error log in my cache folder starts off with the following (this is line 1 in the file):

    a:732:{i:0;a:2:{s:6:"cfgkey";s:10:"STORE_NAME";s:8:"cfgvalue";s:26:"Discount Embroidery Supply";}i:1;a:2:{s:6:"cfgkey";s:11:"STORE_OWNER";s:8:"cfgvalue";s:22:"Mark and Susan Grigsby";}i:2;a:2:{s:6:"cfgkey";s:13:"STORE_COUNTRY";s:8:"cfgvalue";s:3:"223";}i :3;a:2:{s:6:"cfgkey";s:10:"STORE_ZONE";s:8:"cfgvalue";s:2:"13";}i:4;a:2:
    This is NOT an error log file. It is a SESSION DATA file and can/should be ignored.

    Quote Originally Posted by markgrigsby View Post
    My cache directory is purged every night - I have a cron job that deletes everything in the cache directory every day. So, that's not the problem.
    You may not think so, but tell that to the customer that has a cart full of products that suddenly disappear because you've purged the session data while its still in use.
    There really should be no need to purge these files, either manually of via a cron job. The PHP processor should automatically purge them after a predetermined amount of time.

    Quote Originally Posted by markgrigsby View Post
    [29-Dec-2013 19:05:10] PHP Warning: Invalid argument supplied for foreach() in /home1/databasename/public_html/includes/templates/template_default/templates/tpl_modules_products_quantity_discounts.php on line 93
    This won't cause an admin blank page problem.

    Quote Originally Posted by markgrigsby View Post
    One of the things we (me and PayPal technical rep) were doing just before we had this problem was implementing PayFlow Pro. It seems odd that the log file ends with the statement above. Maybe the problem is with PayFlow and I should back those modifications out to try to get the admin panel back.

    What do you think?
    I think this is on the right track. My suggestion would be to delete the PayFlow php files (from the admin section) and see if the problem goes away.
    Also, DO NOT keep a backup of files in any of the folders (or if you do, ensure that you rename them so they don't end with ".php"). Zencart will automatically load all files with the .php extension from some folders, and this will cause problems, including the 'blank screen'.

    Cheers
    RodG

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. suddenly lost admin panel
    By adeibiza in forum General Questions
    Replies: 3
    Last Post: 27 Jun 2009, 04:08 PM
  2. Lost my Admin Panel
    By MW Promotions in forum Basic Configuration
    Replies: 3
    Last Post: 19 Feb 2009, 05:12 AM
  3. Admin Settings - Allowing someone else access my admin panel.
    By europod in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 5 Nov 2008, 03:22 AM

Posting Permissions

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