Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Empty $HTTP_POST_VARS in payment module


Recommended Posts



I'm creating a payment module. On my local machine everything works as expected. But in the customer shop the $HTTP_POST_VARS are empty. I also checked $_POST and $_REQUEST. None of them have any of the forms values in them.


Does anybody know how to fix that?




Link to comment
Share on other sites

Recent versions of PHP have dropped "long array names" including $HTTP_POST_VARS, in favor of $_POST. Is the customer shop at PHP 5.something? The easiest fix may be to upgrade to 2.2 RC2a, which includes a "compatibility layer" which defines $HTTP_POST_VARS, etc., if missing. Failing that, go through the code and change every $HTTP_POST_VARS to $_POST, and ditto for GET, SERVER, etc.


Now why $_POST (and $_REQUEST, which is just a copy of POST and GET) might be empty is a bit of a puzzler. If you're sure that a form is sending method="post" (not get), yet the $_POST array is empty, you need to talk with your customer's site host. It sounds like something is terribly wrong with their server configuration. I can't think of any legitimate reason that POST or GET would be shut down. It's independent of "register global variables", and $_POST has been around for a long time, even if $HTTP_POST_VARS may now be gone.

Link to comment
Share on other sites


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

  • Create New...