I've recently upgraded my test server from wamp (very old version) to a new version of xampp. Since the upgrade my CURL which I use to pull CSV data is failing.
I'm receiving the following error:
Warning: curl_setopt(): Curl option contains invalid characters (\0)
This error is appearing on
$ch = curl_init();
The full initialisation can be seen below:
// CURL Initialisation
$ch = curl_init();
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyAuth);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, $snowAuth);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// Set the URL
curl_setopt($ch, CURLOPT_URL, $URL);
This has not changed at all between the webserver upgrades. I have checked php.ini and verified that php_curl is enabled and ensured that the extension_dir is correct as well (C:/xampp/php/ext).
Any ideas? I'm trying to rollback to an older version of XAMPP now.
Edit: The values of the variables are as follows (dummy data for security), also they are not retrieved from user input or extenal files:
$proxy = "10.0.0.128:8080"
$proxyAuth = "username:password"
$snowAuth = "diffusername:diffpassword"