Total Posts: 22
I am trying to retrieve $_POST data from SAP. I am running Zend Core on Ubuntu with the Zend Core installed Apache server. The target application is Magento. Not sure if that is part of the issue or not, but I don’t believe it is. I have a SAP client that is trying to Post data to my website. I have a simple echo server that I created with Zend framwork that has nothing more than an index controller that captures all the superglobal variables and writes them to a file. I have a Magento server that contains the same capture code. In both cases the capture code exists at the head of the index.php file before any dispatching has a chance to occur.
Here is my capture code:
$file = fopen('request.log', 'w');
fwrite($file, 'Raw Post: '.@file_get_contents('php://input')."\n");
fwrite($file, 'Request: '.print_r($_REQUEST,true)."\n");
fwrite($file, 'Get: '.print_r($_GET,true)."\n");
fwrite($file, 'Post: '.print_r($_POST,true)."\n");
fwrite($file, 'Cookie: '.print_r($_COOKIE,true)."\n");
fwrite($file, 'Server: '.print_r($_SERVER,true)."\n");
fwrite($file, 'Files: '.print_r($_FILES,true)."\n");
fwrite($file, 'Session: '.print_r($_SESSION,true)."\n");
fwrite($file, 'Environment: '.print_r($_ENV,true)."\n");
fwrite($file, 'Globals: '.print_r($_GLOBALS,true)."\n");
I created a static HTML form that posts the same variables I expect from SAP. I get all post data in the request.log for both the echo server and the Magento server (both are running on the same instance of Apache and Zend Core.
When my SAP client posts to the echo server all is well, and I capture all the data that is being sent. When they post the same data to the Magento server, the post array is empty, and CONTENT_TYPE and CONTENT_LENGTH are missing from $_SERVER. HTTP_REFERRER does indicate that the SAP client did arrive there. As far as what the SAP client sees, all is normal up until they are ready to close out the session where the Post data from the login is required but missing.
Where should I look? Does anyone have any ideas?