I am very new to php programming, but not new to web programming. I am setting up an osCommerce store on a W2k03/IIS server and have run into the error below. This happens on the final submit order button. I've done some searching on the web and the general concensus was that it may be a permissions issue. I need to get this resolved and I've not gotten any response in the osCommerce forum which leads me to believe tha maybe it isn't an osCommerce issue. Can anyone tell me if that appears to be the problem? What do I do to correct it? The store is set up at if you want to see the problem for yourself.

Thanks in advance for any help.


Warning: exec(): Unable to fork [/usr/local/bin/curl -d "target_app=WebCharge_v5.06&fulltotal=8.98&ordernumber=0&ccname=PayPal&baddress=2436+x+xxxx+xxxx+Drive&bcity=xxxxx&bstate=Arkansas&bzip=xxxxx-5337&bcountry=Array&bphone=479-571-xxxx&email=&trantype=sale&response_mode=simple&username=x&pw=xxxxxxxx&ccidentifier1=244&ccnumber=xxxxxxxx64&month=06&year=2009&connection_method=POST&delimited_fmt_field_delimiter==&delimited_fmt_include_fields=true&delimited_fmt_value_delimiter=|&delimitedresponse=Y&include_extra_field_in_response=N&last_used_response_num=5&response_fmt=delimited&upg_auth=zxcvlkjh&merch_ip=&upg_version=version&yes=Y" ] in D:\hshome\hers2kee\\catalog\includes\modules\payment\innovative.php on line 111

Warning: Cannot modify header information - headers already sent by (output started at D:\hshome\hers2kee\\catalog\includes\modules\payment\innovative.php:111) in D:\hshome\hers2kee\\catalog\includes\functions\general.php on line 29

Dani AI

Generated

The module in question (innovative.php) is attempting to run an external curl program that does not exist on the Windows host. As observed, the command path resembles a Unix curl binary, and plus the host confirmation that curl is not installed point to the same root cause. The exec() failure prints a PHP warning to the output, which then causes the subsequent "headers already sent" message because header() is called after the warning.

Practical fixes (ordered by preference): prefer replacing the exec-based call with PHP's native cURL extension if present; if php_curl is not enabled, ask the host to enable php_curl.dll or to install a Windows curl.exe and update the module path; otherwise implement an HTTP POST with a pure-PHP fallback (stream context or fsockopen). Disabling display_errors and logging errors prevents warnings from breaking header() in production — ob_start() only masks the symptom and is not a true fix. 's suggestion to run under a LAMP stack is a valid long-term option if the host cannot enable outbound HTTP support.

Example of a concise PHP cURL replacement (use real field names from the module and handle sensitive values securely):

$post = http_build_query($fields);
$ch = curl_init('https://payment-gateway.example/endpoint');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$response = curl_exec($ch);
if ($response === false) { error_log('cURL: '.curl_error($ch)); }
curl_close($ch);

Keep SSL verification enabled in production and check the gateway's expected response format before trusting a fallback.

Recommended Answers

All 6 Replies

Hi there,
I run PHP on a Windows box but with Apache (very easy to set up with XAMPP ).
I didn't hit this problem even though I worked with osCommerce.

Could this be the solution for you?
http://www.somacon.com/p255.php

/usr/local/bin/curl seems to refer to a linux filesystem. Have you checked the file to make sure you have got the includes/require pointing to the correct place?

To resolve the headers sent issue you need to ensure no data is populated to the browser before the header is changed. Unless you use

ob_start();

Regards,
Alex

Right now the domain is hosted on a Windows box elsewhere that I can't install anything to, so I don't think this is an option. But, if I'm not able to resolve the issue, I may have to look at moving it to a linux server. I'll keep digging...

Hi there,
I run PHP on a Windows box but with Apache (very easy to set up with XAMPP ).
I didn't hit this problem even though I worked with osCommerce.

Could this be the solution for you?
http://www.somacon.com/p255.php

I'm currently hosted on a Windows box and don't have any idea how to find out what you're asking. I can get the php info easily, but I'm not sure how to find this out. I am so new to php I don't know where the file is supposed to be pointing to. I've only made style modifications to the site so far. So would it be possible for you to give me a little more detail?

/usr/local/bin/curl seems to refer to a linux filesystem. Have you checked the file to make sure you have got the includes/require pointing to the correct place?

To resolve the headers sent issue you need to ensure no data is populated to the browser before the header is changed. Unless you use

ob_start();

Regards,
Alex

your problem is you're pointing to a Linux location in a Windows environment.

Install curl (if not installed), change the path to point to it, or check if curl is bundled with the PHP install.

Now my host is saying curl isn't installed on the Windows servers. That seems rather crazy to me if they're going to offer osCommerce on their Windows plans, you'd think the server was set up to actually allow it to run.

your problem is you're pointing to a Linux location in a Windows environment.

Install curl (if not installed), change the path to point to it, or check if curl is bundled with the PHP install.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.