envy2000 Posted March 5, 2003 Share Posted March 5, 2003 I have been having a problem with my install that i think is server, or php specific. I have tried installing ms1. I have looked everywhere for a solution. I think it has to do with $HTTP_POST_VARS To trace what was happening with the script below, I put the echo "a"; line in the code. This of course resulted in header errors. I then removed the echo "a"; line, and the HTTP_ var was set. I tried resubmitting a second time (with the echo "a"; line gone) and it didn?t register until pasted line in, posted again (got header error), removed echo "a"; line and refreshed. Here is the code that is causing the problem. Register globals is on. line 335 application_top.php // customer adds a product from the products page case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); echo "a"; } install is here. http://www.paintballgear.memelabs.com/osc/catalog/ Thanks anyone who takes a look. Link to comment Share on other sites More sharing options...
mouflon Posted March 5, 2003 Share Posted March 5, 2003 Your host probably has upgraded to PHP 4.3 check this thread: http://www.oscommerce.com/forums/viewtopic.php?t=34417 Unexpect the Expected Link to comment Share on other sites More sharing options...
envy2000 Posted March 5, 2003 Author Share Posted March 5, 2003 Thanks for the suggestion I am using php 4.2.3 OSC MS1 Globals on. In .htaccess I added this. <IfModule mod_php4.c> php_flag register_globals On php_flag track_vars On </IfModule> I did find and replace of variables as suggested. I still get this error when i add to cart> shoppingcart Object ( [contents] => Array ( ) [total] => 0 [weight] => 0 [cartID] => [content_type] => ) Your Shopping Cart is empty! Any other ideas? Link to comment Share on other sites More sharing options...
mouflon Posted March 5, 2003 Share Posted March 5, 2003 from the thread: anyone running PHP v4.3: Change all instances the superglobals to their new versions $HTTP_SERVER_VARS -> $_SERVER $HTTP_ENV_VARS -> $_ENV $HTTP_COOKIE_VARS -> $_COOKIE $HTTP_GET_VARS -> $_GET $HTTP_POST_VARS -> $_POST $HTTP_POST_FILES -> $_FILES $HTTP_SESSION_VARS -> $_SESSION Unexpect the Expected Link to comment Share on other sites More sharing options...
envy2000 Posted March 7, 2003 Author Share Posted March 7, 2003 Yep I did find and replace of variables as suggested. I still get this error when i add to cart> shoppingcart Object ( [contents] => Array ( ) [total] => 0 [weight] => 0 [cartID] => [content_type] => ) Your Shopping Cart is empty! Any other ideas? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.