Third-party interface-QQ PHP SDK Fatal error:cannot redeclare class OAuth problem

Source: Internet
Author: User
Tags oauth
PHP SDK for download from official website http://wiki.connect.qq.com/sdk%E4%B8%8B%E8%BD%BD#
Then install the configuration and click on the demo will appear below this error, what code I have not changed.

Is my development environment a problem? Google has not solved the problem a lot.

Reply content:

PHP SDK for download from official website http://wiki.connect.qq.com/sdk%E4%B8%8B%E8%BD%BD#
Then install the configuration and click on the demo will appear below this error, what code I have not changed.

Is my development environment a problem? Google has not solved the problem a lot.

This tip is very clear, the OAuth class is repeatedly defined, this situation is generally referred to in your project a number of third-party libraries, in different PHP files are defined within the class Oauth{ } class, and then in the current execution process is require in. To resolve, you can search the global string to class Oauth find the relevant file, make sure that the corresponding class file is only require once, or wrap it up with class_exists judgment.

Another possibility is that the server has an oauth PHP extension installed, and if so, the OAuth class of the framework can be done, and both implementations should be the same.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.