test
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • jmvvliet Friend
    #117661

    Hi all,

    I’m getting a ‘division by zero’ error:

    Warning: Division by zero in /home/bthere36/domains/bthere4u.nl/public_html/templates/ja_pollux/index.php on line 40

    Please take a look at http://85.17.55.2/~bthere36/index.php, here you can see the error. Does anyone know what that error means? It is at this line:

    $ja_headerimg = $ja_header_images [getCurrentMenuIndex() % count($ja_header_images)];

    in the index.php of the ja_pollux theme.

    When I run the site ‘localhost’ then I’m not getting the error!:confused:

    Thanx in advance…

    jmvvliet Friend
    #211684

    Additional info:

    Following PHP Server Settings are not optimal for Security and it is recommended to change them:

    PHP register_globals setting is `ON` instead of `OFF` Joomla! RG_EMULATION setting is `ON` instead of `OFF` in file globals.php
    `ON` by default for compatibility reasons

    second additional:

    Session Directory / Unwriteable

    Could that cause anything wrong?

    ha le-viet Developer
    #211707

    Hi jmvvliet,

    Please replace that line by:

    if (count($ja_header_images)) $ja_headerimg = $ja_header_images [getCurrentMenuIndex() % count($ja_header_images)];

    Regards,
    Ha Le-Viet.

    jmvvliet Friend
    #211709

    Ha-Le-Viet,

    problem solved. But I’m always searching for the reason why… does the current menu index not contain a number > 0, or are there simply no ja_header_images?

    By the way, I’m using Joomla! 1.0.11 and IE 7.0…

    Thanx anyway,

    JMvV

    Omar Ramos JAEC
    #213263

    The problem seems to lie in using the Dropline Menu Script, should you choose the Suckerfish menu, the error goes away.

    Correct me if I’m wrong, but I think that’s what it is.

    -Omar

    fredo Friend
    #213281

    I’ve followed all the advice given in this post however the problem still exists on my site.

    http://www.gorivercruise.co.uk

    Can anyone assist me?

    Regards,

    ha le-viet Developer
    #213761

    Hi fredo,

    I visited your site and see no error or warning message. Did you fix the problem?

    Regards,
    Ha Le-Viet.

    filter2k Friend
    #215583

    Ha Le-Viet,

    I had the error @ line 40 and your solution fixed it (Thank you for that), had the same template running on a different site and it did not have that error. Curious why one site would have it and one would not?? Can you detail “Why?” your solution fixed the error?

    ha le-viet Developer
    #215613

    Hi filter2k,

    The error will show if your webserver error display policy is set to E_ALL, E_NOTICE etc. Some server only reports errors when its status is Fatal or Normal Error and ignore warning and notice errors.

    Regards,
    Ha Le-Viet.

    filter2k Friend
    #216137

    Thank you. Love learning new things.

Viewing 10 posts - 1 through 10 (of 10 total)

This topic contains 10 replies, has 5 voices, and was last updated by  filter2k 17 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum