Error: function Split() is deprecated in PHP api

71 views
Skip to first unread message

rwhite35

unread,
Oct 31, 2009, 9:37:49 AM10/31/09
to AdWords API Forum
Hello,

I'm migrating from APIlity v13 to v200909 and tried to run examples/
v200909/GetAllCampaignsExample.php with mixed results. It seems that
the WSDL is returning an authToken, however, non of my campaign info
returns. I'm making the request on our production account and not the
sandbox either. Also, I get two errors:

First error: Deprecated: Function split() is deprecated in /path/to/
adwords/src/Google/Api/Ads/Common/Util/AuthToken.php on line 70

Second error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://
adwords.google.com/api/adwords/cm/v200909/CampaignService?wsdl' :
Extra content at the end of the document

The following (in addition to functions and methods) is returned:
...
[2] => AdWordsUser Object
(
[email:AdWordsUser:private] =>
mye...@mydomain.com
[password:AdWordsUser:private] =>
1234567890

[requestHeaderElements:AdsUser:private] => Array
(
[userAgent] => AdWords API
PHP Client LIbrary - v1.1.0 - 123-123-1234
[clientEmail] =>
em...@domain.com
[developerToken] =>
112233445566778899
[applicationToken] =>
1234567890
[authToken] => 1234567890-
long string of alphnumerics
)

[defaultServer:AdsUser:private] =>
https://adwords.google.com
[defaultVersion:AdsUser:private]
=> v200909
[logsDirectory:AdsUser:private]
=> /path/to/adwords/logs
)

[3] => CampaignService
)

)
...

My development server is a personal webserver running Mac OSX 10.6,
Apache 2, PHP 5.3 with SOAP enabled.

Any thoughts would be appreciated. Thanks in advance!
rwhite35

rwhite35

unread,
Nov 1, 2009, 4:57:36 PM11/1/09
to AdWords API Forum
I changed the function in AuthToken.php (line 70) from split() to
explode() and this changed the error from the "deprecated split()" to
the following:

Strict Standards: Declaration of AdsSoapClient::__doRequest() should
be compatible with that of SoapClient::__doRequest() in /path/to/
adwords/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php on line 403

Also, I'm still getting the SOAP Parse error either way, with split()
or explode() functions.

SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://
adwords.google.com/api/adwords/cm/v200909/CampaignService?wsdl' :
Extra content at the end of the document

However, the authentication token is returned and my MCC information
is displayed, but non of my campaigns are present.

Any thoughts, anyone?
rwhite35

On Oct 31, 8:37 am, rwhite35 <rwh...@echotimesoftware.com> wrote:
> Hello,
>
> I'm migrating from APIlity v13 to v200909 and tried to run examples/
> v200909/GetAllCampaignsExample.php with mixed results.  It seems that
> the WSDL is returning an authToken, however, non of my campaign info
> returns.  I'm making the request on our production account and not the
> sandbox either. Also, I get two errors:
>
> First error: Deprecated: Function split() is deprecated in /path/to/
> adwords/src/Google/Api/Ads/Common/Util/AuthToken.php on line 70
>
> Second error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://
> adwords.google.com/api/adwords/cm/v200909/CampaignService?wsdl' :
> Extra content at the end of the document
>
> The following (in addition to functions and methods) is returned:
> ...
> [2] => AdWordsUser Object
>                                 (
>                                     [email:AdWordsUser:private] =>
> myem...@mydomain.com

AdWords API Advisor

unread,
Nov 3, 2009, 12:38:30 PM11/3/09
to AdWords API Forum
Hi rwhite35,

Unfortunately the AdWords API PHP client library is not yet compatible
with PHP 3.0. Currently the library only supports PHP 5.2.X. We are
very interested in what PHP versions customers are using, so please
add a comment to the PHP Compatibility page with your information:
http://code.google.com/p/google-api-adwords-php/wiki/PhpCompatibility.

Best,
- Eric Koleda, AdWords API Team
Reply all
Reply to author
Forward
0 new messages