I have
<?php
$ch = curl_init();
$data = array('emailID' => $_POST['emailID'], 'mobileNo' => $_POST['mobileNo'],'orderID'=>$_POST['orderID'],'amount'=>$_POST['amount']);
curl_setopt_array($ch, array(
CURLOPT_RETURNTRANSFER => false,
CURLOPT_URL => 'http://www.ppai.com/p/api/secure/pay/',
CURLOPT_HTTPHEADER =>array ('X-API-KEY:123456789'),
CURLOPT_POSTFIELDS => $data ,
CURLOPT_FOLLOWLOCATION => TRUE
));
$response = curl_exec($ch) ;
// //echo $response ;
?>
But im getting a warning that
Warning: curl_setopt_array() [function.curl-setopt-array]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set
and after a form post this php shoudl redirect me to this url but instead its loading in the same url.
As you can see the warning states..
CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set
There must be two cases for this..
The safe mode must have been enabled, You need to disable it by doing the below step.
Open your php.ini
search for safe_mode
and Change the On to Off
safe_mode = Off
and save the file, restart your webserver.
If that doesn't work, then the open_basedir
must have been assigned some value.. You need to uncomment it.
Open your php.ini
search for open_basedir
and add a seimcolon before it.
;open_basedir =
and save the file, restart your webserver.