Forum Moderators: coopster
The old server ran PHP 4.1.2 whereas the new server runs PHP 4.3.3. Presumably, the problem is due to register globals being off on the new server, but I still can't get the script to work.
In the script, I refer to the passback variables directly e.g. echo $merchant_order_id; Interestingly, if I call the script directly from the command line with?merchant_order_id=x, it recognises it. But try that same thing from the 2checkout payment system, and it gives a blank.
Any ideas?
echo "<pre>\n";
print_r($_GET);
print_r ($_POST);
echo "</pre>\n";
exit;
Note that if the script that sends the form is the same as the one that receives it, you would need to open the page, then change and upload the new PHP file, then submit the form.
[/edit]
[old incorrect stuff]
My guess is that the new server has register_globals off (as it should) but the script is written to expect it to be on (which is bad). You can run phpinfo() on the new server and see whether register globals is on or off.
If that is correct, instead of $myvar, you need to access it via $_GET['myvar']
The easy solution for the near term would be to put a .htaccess file in your site root with the line
php_flag register_globals on
[/old incorrect stuff]
Array
(
)
Array
(
)
When I try that with the old script, it returns the passback variables in the brackets... the scripts are totally identical, just on different servers. If it would help I can paste the phpinfo results from each server...
Old server:
- submit form on page
- sends post/get vars to page or other_page
- process get/post information
New server:
- submit form on page
- does NOT sends post/get vars to page or other_page
- can't process info
So the problem is happening at some point before the page that you are having trouble with. There is no data to deal with, so it can't deal.
You need to move upstream and try to figure out whether the form is actually submitting any data and where it is going.