PHP connection to redis using phpredis error

Source: Internet
Author: User
If phpredis is used in the project to connect to redis, the following error is occasionally reported: {code ...} check that the project configuration information is correct. the error message is that someone has encountered a similar problem in issues of github when using redis to process sessions in the project occasionally, but there is no reason for this... such as the question, used in the project phpredisLink redisOccasionally, the following error is reported:

PHP Fatal error:  Uncaught exception 'RedisException' with message 'Failed to AUTH connection' in [no active file]:0Stack trace:#0 {main}  thrown in [no active file] on line 0"
  1. checkThe project configuration information is correct. this error message appears occasionally.

  2. Use in projectredisProcessingsession

  3. IngithubOfissuesSome people have encountered similar problems, but they have not given the reasons and how to solve them.

If you have encountered similar problems in the project, you should directly use them.predisWhat about this extension?

Reply content:

Such as the question, used in the projectphpredisLinkredisOccasionally, the following error is reported:

PHP Fatal error:  Uncaught exception 'RedisException' with message 'Failed to AUTH connection' in [no active file]:0Stack trace:#0 {main}  thrown in [no active file] on line 0"
  1. checkThe project configuration information is correct. this error message appears occasionally.

  2. Use in projectredisProcessingsession

  3. IngithubOfissuesSome people have encountered similar problems, but they have not given the reasons and how to solve them.

If you have encountered similar problems in the project, you should directly use them.predisWhat about this extension?

The extension phpredis is getting worse and worse ....

Check whether the Redis password is correct. if the cluster is deployed, check whether the environment is inconsistent.

$ Client = new Predis \ Client (array ('scheme '=> 'tcp', 'host' => '2017. 0.0.1 ', 'port' => 6379, 'database' => 15, 'password' => 'password '));

Does the prompted authentication fail?

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.