Hello,
Got a weird problem.. I moved my site to a new hosting company. It is written for php5. On the surface, after making the necessary changes to reflect mysql database everything seems to be working. But in testing the shopping cart feature, I am getting odd error messages.
I am able to add the first item to the cart, but if i were to increase the quantity and save from the cart.php page I get: Warning: array_count_values() [function.array-count-values]: The argument should be an array in cart.php line 73.
if($SESSION['cart']&&array_count_values($SESSION['cart']))
display_cart($_SESSION['cart']);
else
If I were to go back to catagories and add a different item to the cart, I get
Fatal error: Cannot increment/decrement overloaded objects nor string offsets in /home/xxxx/public_html/cart.php on line 19
if(isset($SESSION['cart'][$new]))
(19) $SESSION['cart'][$new]++;
else
$_SESSION['cart'][$new] = 1;
How to duplicate.
www.nystixs.com/models.php?catid=1 (click any model link, next page click "add to cart" )
On the next page, change qty, click save, you will get first error.
Go back to www.nystixs.com/models.php?catid=1, choose a different model, select and "Add to Cart" and u will get
Fatal error: Cannot increment/decrement overloaded objects nor string offsets in /home/nystixsc/public_html/cart.php on line 19
I think something is wrong with the $_SESSION properties. I am moving the site from my Solaris box to linux.. (php config www.nystixs.com/test1.php) Seems like something is not enabled. I reset all IE settings, but had samer result.
Anyone, direction will be greatly appreciated.
-Andre