PHP Fatal error: This client library requires the SOAP extension to be activated

340 views
Skip to first unread message

Aislinn Mc

unread,
May 12, 2016, 9:05:22 AM5/12/16
to AdWords API Forum
Hi all,

I'm trying to use GetKeywordIdeas from the google API, but it's only returning a blank page in my browser.

So I tried executing the file from the command line and this is what I got:

C:\Users\...>php C:\wamp\www\...\examples\AdWords\v201603\Optimization\GetKeywordIdeas.php
PHP
Notice:  Use of undefined constant WSDL_CACHE_NONE - assumed 'WSDL_CACHE_NONE' in C:\wamp\www\...\lib\Google\Api\Ads\Common\Lib\AdsUser.php on
line
449
PHP
Stack trace:
PHP  
1. {main}() C:\wamp\www\...\examples\AdWords\v201603\Optimization\GetKeywordIdeas.php:0
PHP  
2. AdWordsUser->__construct() C:\wamp\...\test\examples\AdWords\v201603\Optimization\GetKeywordIdeas.php:237
PHP  
3. AdsUser->LoadSettings() C:\wamp\...\test\lib\Google\Api\Ads\AdWords\Lib\AdWordsUser.php:305

Notice: Use of undefined constant WSDL_CACHE_NONE - assumed 'WSDL_CACHE_NONE' in C:\wamp\www\...\lib\Google\Api\Ads\Common\Lib\AdsUser.php on line 449

Call Stack:
   
0.0015     661696   1. {main}() C:\wamp\www\...\examples\AdWords\v201603\Optimization\GetKeywordIdeas.php:0
   
0.0315    1356032   2. AdWordsUser->__construct() C:\wamp\www\...\examples\AdWords\v201603\Optimization\GetKeywordIdeas.php:237
   
0.0362    1404856   3. AdsUser->LoadSettings() C:\wamp\www\...\lib\Google\Api\Ads\AdWords\Lib\AdWordsUser.php:305

PHP
Fatal error:  This client library requires the SOAP extension to be activated. See http://php.net/manual/en/soap.installation.php for details. in C:\wamp\www\...\lib\Google\Api\Ads\Common\Lib\SoapClientFactory.php on line 179
PHP
Stack trace:
PHP  
1. {main}() C:\wamp\www\...\examples\AdWords\v201603\Optimization\GetKeywordIdeas.php:0
PHP  
2. GetKeywordIdeasExample() C:\wamp\www\...\examples\AdWords\v201603\Optimization\GetKeywordIdeas.php:249
PHP  
3. AdWordsUser->GetService() C:\wamp\www\...\examples\AdWords\v201603\Optimization\GetKeywordIdeas.php:81
PHP  
4. AdsUser->GetServiceSoapClient() C:\wamp\www\...\lib\Google\Api\Ads\AdWords\Lib\AdWordsUser.php:455
PHP  
5. SoapClientFactory->GenerateSoapClient() C:\wamp\www\...\lib\Google\Api\Ads\Common\Lib\AdsUser.php:257
PHP  
6. trigger_error() C:\wamp\www\...\lib\Google\Api\Ads\Common\Lib\SoapClientFactory.php:179

Fatal error: This client library requires the SOAP extension to be activated. See http://php.net/manual/en/soap.installation.php for details. in C:\wamp\www\...\lib\Google\Api\Ads\Common\Lib\SoapClientFactory.php on line 179

Call Stack:
   
0.0015     661696   1. {main}() C:\wamp\www\...\examples\AdWords\v201603\Optimization\GetKeywordIdeas.php:0
   
0.0404    1362184   2. GetKeywordIdeasExample() C:\wamp\www\...\examples\AdWords\v201603\Optimization\GetKeywordIdeas.php:249
   
0.0404    1362352   3. AdWordsUser->GetService() C:\wamp\www\...\examples\AdWords\v201603\Optimization\GetKeywordIdeas.php:81
   
0.0405    1363544   4. AdsUser->GetServiceSoapClient() C:\wamp\www\...\lib\Google\Api\Ads\AdWords\Lib\AdWordsUser.php:455
   
0.0405    1363544   5. SoapClientFactory->GenerateSoapClient() C:\wamp\www\...\lib\Google\Api\Ads\Common\Lib\AdsUser.php:257
   
0.0405    1363840   6. trigger_error() C:\wamp\www\...\lib\Google\Api\Ads\Common\Lib\SoapClientFactory.php:179





I ran "php --enable-soap" and the extension is ticked in WAMP.

Can anyone tell me where I went wrong please?

Bonus question: can I use GetKeywordIdeas from a browser or will I always have to go through the command line? I'm not familiar with cmd so I would like to access this from a browser.

Thanks!

Shwetha Vastrad (AdWords API Team)

unread,
May 12, 2016, 11:10:21 AM5/12/16
to AdWords API Forum
Hi,

Could you provide the version of PHP you use? 

If you are using the AdWords API PHP client library, you have to use the command line. You can instead use the Keyword Planner tool in the AdWords UI where you can search for keyword and ad group ideas. More information about the Keyword Planner is available here.

Thanks,
Shwetha, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages