Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Divided by zero & Cannot modify header Error??


Tobias

Recommended Posts

Just installed the osCommerce, and when i "tested" the shop, when im going to check out i get the following error and i have no clue what to do, please advice!!

Would be more then happy if i got some help on this;

 

Warning: Division by zero in /home2/neotoxd/public_html/shop/catalog/includes/classes/shipping.php on line 61

 

Warning: Division by zero in /home2/neotoxd/public_html/shop/catalog/includes/classes/shipping.php on line 62

 

Warning: Cannot modify header information - headers already sent by (output started at /home2/neotoxd/public_html/shop/catalog/includes/classes/shipping.php:61) in /home2/neotoxd/public_html/shop/catalog/includes/functions/general.php on line 29

Link to comment
Share on other sites

you may have modified two files, shipping.php and general.php

open each one up separately, then go to the bottom and remove any spaces after ?> (hit the delete key a few times)

Link to comment
Share on other sites

What line is 61/62 - I have a modified OSC and mine don't match your error.

 

Warning: Cannot modify header information - headers already sent by (output started

Caused by the line 61/62 error. You can't send HTML header information once data has been transfered. Normally not an issue but this error is messing things up.

 

Dylan

Link to comment
Share on other sites

Okey, the first problem is now solved, thnx, although the other is making me a nice headache. Although i still get the same %#"? error like this:

 

Warning: Division by zero in /home2/neotoxd/public_html/shop/catalog/includes/classes/shipping.php on line 58

 

Warning: Division by zero in /home2/neotoxd/public_html/shop/catalog/includes/classes/shipping.php on line 59

Link to comment
Share on other sites

shop/catalog/includes/classes/shipping.php has whitespace place your cursor after the last ?> and hit delete several times save the file and upload, this is best done offline by using an ftp program to download the file before edit as the online file manager in admin can cause problems when editing

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Have you ever modify the value of "Enter the Maximum Package Weight you will ship" in the

Admin -> system setting -> Shipping/Packaging
.

The default value is "50", You also can find a sql line in the oscommerce.sql

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Enter the Maximum Package Weight you will ship', 'SHIPPING_MAX_WEIGHT', '50', 'Carriers have a max weight limit for a single package. This is a common one for all.', '7', '3', now());

 

This constant is used in shipping.php line 61

$shipping_num_boxes = ceil($shipping_weight/SHIPPING_MAX_WEIGHT);

Fan of OSC system.................

Comming From China.............

Link to comment
Share on other sites

..I don't know if the stupid way for you, but for me sometimes working well

and that is just reupload the fresh files from the oscomerce download file.........

 

catalog/includes/classes/shipping.php

catalog/includes/functions/general.php

 

and see if this works??? ;)

 

 

i don't know if this is true, but somehow uploading will mess up the code (rare chance)...i don't know why...even thought you set it to ascii code mode...... ;)

OS-commerce is great, but with other magical contributions, that is just so "COOL"!

Link to comment
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...