Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Sep 2006
    Posts
    11
    Plugin Contributions
    0

    Default How to turn off PHP errors so that no one can see you file structure

    Dear All,

    I was wondering if any knows how to stop ZenCart from displaying the errors out onto the browser like the following:

    Warning: Division by zero in /home/server/user/www.mywebsite.co.uk/shop/includes/modules/category_row.php on line 245

    I know there is a way of doing it using PHP, but how would I implement it into Zencart and which file would I put it in?

    Regards
    Solidariti

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,649
    Plugin Contributions
    6

    Default Re: How to turn off PHP errors so that no one can see you file structure

    I'd first worry about why you have division by zero errors before trying to hide the error ...

    What is your setting in the Maximum Values for:
    Categories To List Per Row
    How many categories to list per row
    Then be concerned that there are only 50 lines in the file
    /includes/modules/category_row.php

    you list line 245 ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  3. #3
    Join Date
    Sep 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: How to turn off PHP errors so that no one can see you file structure

    Dear Linda,

    Thank you I changed the amount of line numbers, just for security reasons the line it is on is 24. The maximum number for the list of categories on a row is 3, and there seems to be 3 categories being displayed.

    Regards
    Solidariti

  4. #4
    Join Date
    Sep 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: How to turn off PHP errors so that no one can see you file structure

    Do you know hw I would go about fixing this issue, and then stopping zencart from displaying errors?

    Regards
    Solidariti

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,649
    Plugin Contributions
    6

    Default Re: How to turn off PHP errors so that no one can see you file structure

    What version Zen Cart ...

    What code do you have lines 20 to 30?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  6. #6
    Join Date
    Sep 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: How to turn off PHP errors so that no one can see you file structure

    1.3.0.1 it says its current


    $row = 0;
    $col = 0;
    $list_box_contents = '';
    if ($num_categories < MAX_DISPLAY_CATEGORIES_PER_ROW || MAX_DISPLAY_CATEGORIES_PER_ROW == 0) {
    $col_width = floor(100/$num_categories);
    } else {
    $col_width = floor(100/MAX_DISPLAY_CATEGORIES_PER_ROW);
    }

    while (!$categories->EOF) {
    if (!$categories->fields['categories_image']) !$categories->fields['categories_image'] = 'pixel_trans.gif';

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,649
    Plugin Contributions
    6

    Default Re: How to turn off PHP errors so that no one can see you file structure

    Zen Cart v1.3.0.1 has so many security issues and bugs and lack of features ...

    Have you considered upgrading to the current Zen Cart v1.3.7 with the Patch for:
    http://www.zen-cart.com/forum/showthread.php?t=56216
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  8. #8
    Join Date
    Sep 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: How to turn off PHP errors so that no one can see you file structure

    How come it says that it is still current? Is that a beta version then?

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,649
    Plugin Contributions
    6

    Default Re: How to turn off PHP errors so that no one can see you file structure

    That was one of the bugs in that version ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  10. #10
    Join Date
    Sep 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: How to turn off PHP errors so that no one can see you file structure

    What are the procedures before an update should be conducted?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Email SMTP issues (needed 'smtpauth' instead of 'smtp')
    By petpromises in forum General Questions
    Replies: 23
    Last Post: 8 Nov 2006, 01:48 PM
  2. problems with getting to the admin page
    By shadowfax in forum Installing on a Linux/Unix Server
    Replies: 17
    Last Post: 29 Jun 2006, 01:58 AM

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
  •