Jump to content

 

Sabjian

Member Since 24 Mar 2011
Offline Last Active May 25 2016 08:42 PM
-----

Posts I've Made

In Topic: Australia Post Shipping Module Stopped Working

25 May 2016 - 08:44 PM

Thank you for your help. Your right about the pricing,  I have gone back and checked and the cs-cart ones have been wrong. Aus post recently changed all they international post pricing and they are the ones out.

 

I have decided to do manual postage calcs for now. Hope the cs-cart guys can get it working on the correct API quickly


In Topic: Warning: Invalid Argument Supplied For Foreach() In App\controllers...

30 June 2015 - 11:29 AM

I was a bit dumb struck and disbelieving too. I changed my mind only after decreasing the numbers in my test script and it unserialized with no errors straight away. Thanks to VirtualBox I am now a proud owner of a Ubuntu LAMP stack and the site is running without those errors.

The following comes from the php manual.

The size of an integer is platform-dependent, although a maximum value of about two billion is the usual value (that's 32 bits signed). 64-bit platforms usually have a maximum value of about 9E18, except for Windows, which is always 32 bit. PHP does not support unsigned integers.Integer size can be determined using the constant PHP_INT_SIZE, and maximum value using the constant PHP_INT_MAX since PHP 4.4.0 and PHP 5.0.5.


In Topic: Warning: Invalid Argument Supplied For Foreach() In App\controllers...

29 June 2015 - 11:33 PM

Thanks tbirnseth.

Good news is that I tracked down the issue. PHP on windows does not support 64bit Integer values and the last array in the example has integers greater than 2,147,483,647.

Looks like I'm moving my dev environment to Linux

In Topic: Warning: Invalid Argument Supplied For Foreach() In App\controllers...

29 June 2015 - 08:08 AM

I've also gotten this issue while upgrading my 2.2.4 store to 4.3.2. Definitely due to unserialized() function failing. I don't want to ignore it as it is obviously corrupting the data.

I think that I have narrowed it down to a Windows vs Linux issue but still digging. The code below generates an error in my Windows dev environment however works on my Linux prod environment. Any suggestions on what might be causing this ?

<?php
$data = 'a:1:{i:7;a:8:{s:9:"rate_type";s:1:"P";s:10:"rate_value";s:6:"10.000";s:18:"price_includes_tax";s:1:"Y";s:9:"regnumber";s:0:"";s:8:"priority";i:1;s:12:"tax_subtotal";d:4.79;s:11:"description";s:3:"GST";s:7:"applies";a:3:{s:1:"P";d:4.2000000000000002;s:1:"S";d:0.58999999999999997;s:5:"items";a:2:{s:1:"S";a:1:{i:12;b:1;}s:1:"P";a:13:{i:2795236705;b:1;i:3965362348;b:1;i:669423038;b:1;i:3738170828;b:1;i:2692647281;b:1;i:2930049347;b:1;i:331338368;b:1;i:2327216954;b:1;i:4256281516;b:1;i:3915326440;b:1;i:1674913295;b:1;i:4249166376;b:1;i:4208752565;b:1;}}}}}';
$tmp = unserialize($data);
print_r(array_values($tmp));
?>

Have also raised a ticket with the support crew at CS Cart. Hoping a PHP guru can laugh and tell me what I have done wrong. :)