Home » Web Services » SOAP » Bug #9415
Disabled CURLOPT_FOLLOWLOCATION in 4.4.4
Details
| Submitted | 2006-11-22 15:21 UTC |
|---|---|
| From | mailing001 at xego dot it |
| Assigned | yunosh |
| Status | Closed |
| Package | SOAP |
| PHP Version | 4.4.4 |
| Roadmaps | (Not assigned) |
Comments
[2006-11-22 15:21 UTC] mailing001 at xego dot it
Description:
------------
From php 4.4.4 CURLOPT_FOLLOWLOCATION is disabled in curl when open_basedir or safe_mode are enabled.
Test script:
---------------
This is a workaround/patch:
--- SOAP/Transport/HTTP.php.orig 2006-11-22 16:08:42.000000000 +0100
+++ SOAP/Transport/HTTP.php 2006-11-22 16:14:51.000000000 +0100
@@ -589,7 +589,9 @@
curl_setopt($ch, CURLOPT_URL, $this->url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_FAILONERROR, 0);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
+ if (! ini_get("safe_mode")) {
+ curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
+ }
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
if (defined('CURLOPT_HTTP_VERSION')) {