I have an order API script that uses PHP to parse the order data from Shopsite. I've used this script for a couple years on a different Verio VPS without any issues. I recently upgraded to the latest Shopsite and moved to a new VPS at Verio without migrating the old store to the new. I loaded all of the settings, pages and products from scratch in the new store. Everything is working fine other that the order api script (and Shopsite not being able to fine sendmail for order confirmations).
When I use my php script for the order api the script executes (order data is sent to my fulfillment center) then throws a 500 Internal server error when trying to go the the thankyou.cgi. When I check my error logs I see a ambiguous malformed header error. If I use the perl test script everything works fine.
I shortened my script for testing purposes to the following:
- Code: Select all
#!/usr/local/bin/php
<?php
$query_string = trim(fgets(STDIN));
parse_str($query_string, $order);
?>
Is there any reason why a PHP CLI script will execute when called then throw the 500 External Server Error when trying to go the the thankyou.cgi? I've also tested executing PHP scripts from the command line in the same directory (cig-bin/sc/) with the same permissions (755) without an issue. Could there be some disconnect between the CLI PHP and the Apache PHP?
This one has me stumped. Any help would be greatly appreciated.
Thanks,
Kyle