With PHP Library, Getting ........google-ads-php\examples\BasicOperations/../../vendor/autoload.php): failed to open stream: No such file or directory warning error

401 views
Skip to first unread message

Pavan V

unread,
Feb 19, 2019, 10:36:03 AM2/19/19
to AdWords API and Google Ads API Forum

Hello There,

I'm new to Adwords API. I've downloaded the Adwords PHP Client Library. I followed the steps provided at https://developers.google.com/adwords/api/docs/guides/start. I've received Developer Token,OAuth client ID and Secret and placed them at examples/Authentication/google-ads_api.php. And I don't know how to get refresh token. I'm using XAMPP localhost for this work. And the project url is http://localhost/adwords_api/google-ads-php/examples/BasicOperations/GetCampaigns.php . Now to where should I move that google_ads_api.php file. And how can I get out from that error.The errors are pasted below. And screenshots are attached. Please help me in this.


Warning: require(D:\xampp\htdocs\adwords_api\google-ads-php\examples\BasicOperations/../../vendor/autoload.php): failed to open stream: No such file or directory in D:\xampp\htdocs\adwords_api\google-ads-php\examples\BasicOperations\GetCampaigns.php on line 20

Fatal error: require(): Failed opening required 'D:\xampp\htdocs\adwords_api\google-ads-php\examples\BasicOperations/../../vendor/autoload.php' (include_path='D:\xampp\php\PEAR') in D:\xampp\htdocs\adwords_api\google-ads-php\examples\BasicOperations\GetCampaigns.php on line 20

Regards,
Pavan.
adwords_api error2.png
adwords_api error.png

googleadsapi...@google.com

unread,
Feb 19, 2019, 5:31:08 PM2/19/19
to v.p...@ailabs.in, AdWords API and Google Ads API Forum
Hello Pavan,

Please note that our PHP code examples are meant to be run from command prompt, not via the web browsers. You could follow the instructions mentioned here, using the composer is the recommended way to install the client libraries. You could refer this guide to get the refresh token. Please let me know if you are still facing any issues. 

Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Pavan V

unread,
Feb 20, 2019, 4:26:54 AM2/20/19
to AdWords API and Google Ads API Forum
Hello Sai Teja,

Thank you for the reply. The link you've mentioned to get 'refresh token" is not helping me. There(Github link) is no information provided to get refresh token. And I want to integrate this API with PHP Codeigniter. How can I integrate it with CodeIfniter. And as you said, I executed GetCampaigns.php to test and getting following error..

PHP Warning:  require(D:\xampp\htdocs\adwords_api\google-ads-php\examples\BasicOperations/../../vendor/autoload.php): failed to open stream: No such
file or directory in D:\xampp\htdocs\adwords_api\google-ads-php\examples\BasicOperations\GetCampaigns.php on line 20

Screenshot also attached.
api_error_git.png

googleadsapi...@google.com

unread,
Feb 20, 2019, 3:10:21 PM2/20/19
to AdWords API and Google Ads API Forum
Hello Pavan,

Apologies for the inconvenience, You could follow this guide to get refresh token for web app flow or for Installed flow. If you haven't installed client libraries using composer, then follow this guide to install them with all the dependencies. If the problems persists, you could unzip and place the attached vendor file into your client library and give it a try. Looks like vendor files are missing when you installed.

Our client library codes are meant to run from command line but not as web pages. For questions on integrating PHP library library with PHP Codeigniter, you could contact on our PHP client library by creating an issue here.

Please let me know if you have any further questions.

Regards,
Sai Teja, AdWords API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

adw...@webpromo.us

unread,
Apr 4, 2019, 5:08:38 PM4/4/19
to AdWords API and Google Ads API Forum
Pavan,

I'm having the same error and cannot find any documentation as to what "autoload.php" is supposed to contain.
Have you found anything yet?


On Tuesday, February 19, 2019 at 8:36:03 AM UTC-7, Pavan V wrote:

<snip> ../../vendor/autoload.php): failed to open stream: No such file or directory in D:\xampp\htdocs\adwords_api\google-ads-php\examples\BasicOperations\GetCampaigns.php on line 20
<snip>

googleadsapi...@google.com

unread,
Apr 5, 2019, 2:17:52 PM4/5/19
to AdWords API and Google Ads API Forum
Hello,

You might be missing some dependencies while installing the client library. If you haven't installed client libraries using composer, then follow this guide to install them with all the dependencies. If the problems persists, you could create an issue on our PHP client library here.


Regards,
Sai Teja, Google Ads API Team

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/c53ae114-31e9-40a0-b5a2-479f054d2e8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Liquintel

unread,
Jul 8, 2019, 6:36:46 AM7/8/19
to AdWords API and Google Ads API Forum
How To Resolve this error i m woking at hosting server..  i have to get all campaign i m tried getCampaign.php file but this error showing how can i resolve this let me know????
 
Warning: require(/storage/ssd1/493/4996493/public_html/PHP/userpanel/../../vendor/autoload.php): failed to open stream: No such file or directory in /storage/ssd1/493/4996493/public_html/PHP/userpanel/testcampaign.php on line 4

Fatal error: require(): Failed opening required '/storage/ssd1/493/4996493/public_html/PHP/userpanel/../../vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /storage/ssd1/493/4996493/public_html/PHP/userpanel/testcampaign.php on line 4

Google Ads API Forum Advisor Prod

unread,
Jul 8, 2019, 4:26:06 PM7/8/19
to adwor...@googlegroups.com
Hello,

As mentioned in my previous post, it should be that the dependencies might have not installed properly. You have to follow the instructions mentioned here to download the dependencies related to the PHP client library. Please give it a try and let me know if you have any further questions. 

Regards,
Sai Teja, Google Ads API Team

ref:_00D1U1174p._5001UCbZ08:ref
Reply all
Reply to author
Forward
0 new messages