Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Posts
    21
    Plugin Contributions
    0

    red flag Warning: Division by zero in /includes/modules/theme307/featured_products.php

    Upgraded from 1.3.9h to 1.50, Final upgrade does not show items in cart.

    I installed the ZenCart update using Dreamweaver FTP, then ran zc_install. PHP Version: 5.2.17 (Zend: 2.2.0). Database: MySQL 5.5.29-log.

    The issue started after I did the final update and went live. I tested it perfectly on a copy site, and database, via on how the upgrade instructions informed me.

    I have a Theme named 307 as my template, which preformed perfectly on the test site, my log files do give me a:
    [29-Jan-2013 11:23:58] PHP Warning: Division by zero in /home2/koonberr/public_html/zen_test/includes/modules/theme307/featured_products.php on line 100
    [29-Jan-2013 11:23:58] PHP Warning: Division by zero in /home2/koonberr/public_html/zen_test/includes/modules/theme307/featured_products.php on line 100


    I checked these lines, and have searched around for the error I am getting in site after selecting shopping cart, or adding to shopping cart, which is: TEXT_PRODUCT_NOT_FOUND. This error seems to be coming from code in includes/languages/english/document_general_info.php & product_free_shipping_info.php & product_info.php, as well as others that state:
    Code:
    define('TEXT_PRODUCT_NOT_FOUND', 'Sorry, the product was not found.');
    , except strangely the "Sorry, the product was not found" does not display.

    I searched around on this forum and http://stackoverflow.com to figure out if it was a php issue on the template, but I could not figure it out.

    It eludes me, it worked perfectly, I even redid the installation upgrade on the database, and reinserted the updated files into the proper directories again. I would greatly appreciate any advice that would help me to figure this issue out.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

    Quote Originally Posted by serovectra View Post
    I installed the ZenCart update using Dreamweaver FTP
    Oy. DW is famous for skipping files when doing mass uploads via its so-called "FTP", and never telling you that it failed to upload half of your files.
    I never trust DW for mass uploads. Maybe one file at a time, sure. But never entire directories or subdirectories.

    Quote Originally Posted by serovectra View Post
    I have a Theme named 307 as my template, which preformed perfectly on the test site
    TM templates are very prone to problems especially since they hack apart a lot of the core code and seldom update any of them to correctly work with the latest version of Zen Cart let alone the latest version of PHP.
    Quote Originally Posted by serovectra View Post
    my log files do give me a:
    [29-Jan-2013 11:23:58] PHP Warning: Division by zero in /home2/koonberr/public_html/zen_test/includes/modules/theme307/featured_products.php on line 100
    Sounds like a coding error in their customized file.
    Quote Originally Posted by serovectra View Post
    I checked these lines, and have searched around for the error I am getting in site after selecting shopping cart, or adding to shopping cart, which is: TEXT_PRODUCT_NOT_FOUND. This error seems to be coming from code in includes/languages/english/document_general_info.php & product_free_shipping_info.php & product_info.php, as well as others that state:
    Code:
    define('TEXT_PRODUCT_NOT_FOUND', 'Sorry, the product was not found.');
    , except strangely the "Sorry, the product was not found" does not display.
    Not sure what those files have to do with the featured_products.php module. I suspect they're merely messengers of a deeper problem.
    Quote Originally Posted by serovectra View Post
    It eludes me, it worked perfectly, I even redid the installation upgrade on the database, and reinserted the updated files into the proper directories again. I would greatly appreciate any advice that would help me to figure this issue out.
    What exactly is different between your test site and your live site? Obviously there are differences or it would be working fine in both instead of only working correctly on the test site. You could be missing important files on the live site, you might have "extra" files on your live site which are interfering with normal operation, you might have different content in the live-site database compared to the content on your test-site database, the two servers might be using different PHP versions, and the list goes on.

    http://www.zen-cart.com/wiki/index.p...Obscure_Issues
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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.

  3. #3
    Join Date
    Nov 2009
    Posts
    21
    Plugin Contributions
    0

    Default Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

    Thank you for the quick response, I will go ahead and restart the test site from scratch. I will also use winmerge to see the difference in individual files between the test server, and the live server. I think you may be on key with the fault of DW's FTP, do you have any good recommendations for open source "FTP" programs? I know I could google it, but you seem to be someone who is much more in-tuned, considering you answer 85% of the problems on zen-cart, and apply the information for updates.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

    I find this list rather helpful: http://www.zen-cart.com/wiki/index.php/Useful_Tools
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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.

  5. #5
    Join Date
    Nov 2009
    Posts
    21
    Plugin Contributions
    0

    Default Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

    I redid the entire site again, from scratch, using winSCP to upload the files. I also decided to use the default ZenCart Template, but I still receive the "TEXT_PRODUCT_NOT_FOUND" when I go to the check out, or I check my cart. I'm starting to think it's a database error. Any other ideas?

  6. #6
    Join Date
    Nov 2009
    Posts
    21
    Plugin Contributions
    0

    Default Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

    Sorry, this is the error I am getting now.

    [30-Jan-2013 18:10:07] PHP Warning: Division by zero in /home2/koonberr/public_html/includes/functions/functions_general.php on line 1302
    [30-Jan-2013 18:10:07] PHP Warning: Division by zero in /home2/koonberr/public_html/includes/functions/functions_general.php on line 1302

  7. #7
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

    Quote Originally Posted by serovectra View Post
    I still receive the "TEXT_PRODUCT_NOT_FOUND" when I go to the check out, or I check my cart. I'm starting to think it's a database error. Any other ideas?
    If it's literally saying "TEXT_PRODUCT_NOT_FOUND" instead of the defined language string normally used for that, then you're missing language files or part of their content.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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.

 

 

Similar Threads

  1. v154 PHP Warning: Division by zero header_php_review.php
    By cyberfolli in forum General Questions
    Replies: 5
    Last Post: 15 Oct 2015, 02:53 PM
  2. v151 PHP Warning: Division by zero in public_html/store/includes/classes/c
    By lilly06 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 2
    Last Post: 27 Sep 2013, 06:29 PM
  3. Warning: Division by zero in attributes_controller.php
    By Snicklefritz in forum Setting Up Categories, Products, Attributes
    Replies: 14
    Last Post: 12 May 2010, 04:19 PM
  4. Warning: Division by zero in /includes/classes/shipping.php on line 94
    By keycraze in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 21 Sep 2008, 09:40 PM
  5. Replies: 3
    Last Post: 27 Jan 2007, 05:31 PM

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