Description
Copied from:
https://groups.google.com/forum/?fromgroups#!topic/google-doubleclick-for-publishers-api/u1PFQiLCjas
I got a problem by post a soap request to dfp (with the standard php library): I just got the error message "Unmarshalling error: null". Not very concrete... on a dev-server this behaviour does not occur, so I compared both SOAP-Requests and found out, that the only difference was in
"<ns1:authentication xsi:type="ns1:OAuth">*****/ns1:authentication"
The XSI Type (xsi:type="ns1:OAuth") was not send on the other server. I searched in the source code and found the following (dfp_api_2.1.17 is used) in the file "AdsSoapClient.php" line 416:
if (version_compare(PHP_VERSION, '5.2.6', '<') ||
(PHP_OS == 'Darwin' && version_compare(PHP_VERSION, '5.3.0', '<'))) {
$addXsiTypes = TRUE;
}
Here is determined, in which PHP Versions the xsi types are added. However, my Version is "5.2.6-1+lenny16" and it seems like it also need these xsi type. So I add the following:
if (version_compare(PHP_VERSION, '5.2.6', '<') ||
PHP_VERSION === "5.2.6-1+lenny16" ||
(PHP_OS == 'Darwin' && version_compare(PHP_VERSION, '5.3.0', '<'))) {
$addXsiTypes = TRUE;
}
I have no idea, whether all of the PHP 5.2.6 versions are affected, so I extend the if-condition only for this special case. My request is to implement this in the next release of dfp php library (so it's not necessary to edit the file for every update). However, if the problem can be generalized, be aware that the command
version_compare(PHP_VERSION, '5.2.6', '=')
return false with the PHP Version '5.2.6-1+lenny16'.