开发者

OAuth Extension Loading in PHP

开发者 https://www.devze.com 2023-03-25 13:27 出处:网络
Hi I am really struggling with this one. I am developing with Google Analytics and Google Adwords; and I am using two separate Oauth libraries in the API Helper Libraries that are written by Google.

Hi I am really struggling with this one.

I am developing with Google Analytics and Google Adwords; and I am using two separate Oauth libraries in the API Helper Libraries that are written by Google. One is an extension (oauth.so) for Adwords and the other is just a PHP class for Analytics.

When I alter my php.ini file to load the extension, my Analytics OAuth breaks. I think it maybe a conflict of the class names? I have tried changing the name, but haven't had any luck. I had thought that I came up with a solution: Using the dl() function to dynamically load the oauth.so extension on just the Adwords related pages (they are separate 开发者_开发知识库scripts):

dl('oauth.so');

Which works great on the command line! But it doesn't work in the browser. I refuse to believe that nobody has come across this issue before. I know that loading the extension from php.ini works in the browser, it just disables the Analytics class. Any one with experience with this, I'd love to hear your input, if you have any suggestions please feel free!

Thank you


The AdWords API PHP client library has been updated to allow for different OAuth libraries:

http://code.google.com/p/google-api-adwords-php/source/detail?r=178

You could even write your own OAuthHandler class that utilized the existing OAuth library that the Analytics library uses.


It's been removed from some SAPI's, either switch to CGI for the webserver (brr), or try to fix the problem with your Analytics PHP class.

0

精彩评论

暂无评论...
验证码 换一张
取 消