Discuz fails to set Ucenter synchronous login

Source: Internet
Author: User
Tags php file php and to domain

Solution

1. Check whether communications between applications in the UCenter background are successful.

 

2. Check whether "yes" is enabled for synchronous logon for each application in the UCenter ".

 

3. Check cookiepre of each application. It cannot be set to the same, that is, the cookiepre value of each application must be set to different.

 

4. Check whether the UCenter parameter settings in the config. php file of UCenter Home are correct. As a result, UCenter Home cannot connect to UCenter.

You can log on to the UCenter background and choose Application Management> Edit UCenter Home. Copy the UCenter configuration information of the bottom application, and copy the configuration of UCenter Home. replace the corresponding information in php.

 

 

5. For other applications, check whether the UCenter parameter settings in the application configuration file are correct. The procedure is the same as above.

6. If the encoding is utf8, check whether your config file has modified the encoding. The default encoding is ansi rather than utf8. If the config file has been modified with UTF-8 encoding, logon failure may occur due to unsuccessful UCenter communication.

7. If a user registers in a forum or other application, the new user needs to manually log on to the UCenter Home or other applications for the first time. Later, the user can log on synchronously.

8. Discuz! 7.0.0 cannot be synchronized with other applications

Open global. func. php and find

$ Show_message = str_replace ("'", "'", strip_tags ($ show_message ));

Replace:

$ Show_message = str_replace ("'", "'", $ show_message );

If not

Discuz! 7.0.0 official version cannot display space connections in the header, provided that UCenter Home is installed in the same UCenter.

Open./include/cache. func. php

Find

If (@ include (DISCUZ_ROOT. './uc_client/data/cache/apps. Php') & is_array ($ _ CACHE ['apps']) {

Replace

@ Include (DISCUZ_ROOT. './uc_client/data/cache/apps. Php ');


If (is_array ($ _ CACHE ['apps']) {

9. In the application configuration file, modify the 'UC _ IP' address to your server IP address.

Previously

Define ('UC _ IP', '2017. 0.0.1 );

Change

Define ('UC _ IP', '69. 89.31.213 ');

 

After modification, everything is normal and can be synchronized.

Explanation: 127.0.0.1 is caused by the fact that some servers do not support self-access. Many virtual hosts have this problem.

10. If you want to enable registration and Email verification on the background of the forum, after the application logs on to the forum, it is not logged on to the forum. We recommend that you disable this setting first.

Summary

1. First, log on to the UCenter background and manage applications to ensure that the application successfully communicates with the UCenter. If the communication fails, follow these steps:

1. Check whether the URL is correct in the UCenter background, application management, editing, and interface URL.

2. Application IP address: leave it blank normally. If the UCenter fails to communicate with the application due to domain name resolution issues, set it to the IP address of the server where the application is located.

3. Communication KEY: the communication KEY here corresponds to the number set in the define ('UC _ key',) in the config configuration file of each application.

4. Check whether the UCenter background, application management, editing, and ID value are the same as the value of define ('UC _ APPID ',) in the config file of the application.

5. If synchronization is always unavailable, check whether the config configuration file encoding is in the default ANSI format or delete applications to recreate

2. Log on to the UCenter background, manage applications, edit applications, and ensure "whether synchronous logon is enabled". Select "yes ".

3. Check the cookies in the config file of each application. Do not set them to the same.

4. Make sure that the parameters (communication key/interface URL) set in the config file of each application are the same as those in UCenter background application management.

The following is an example of configuring uc and dedecms.

The method is as follows:
I will not talk about the integration process. No friends can join baidu or google. The integration tutorials are full of flying sky.
To achieve dual-synchronous login or logout:

Open the UCENTER background, select the application, and select DISCUZ. First, check whether the communication between the UCENTER and DISCUZ, UCENTER and DEDE is normal. If yes, copy the communication keys of the UCENTER and DISCUZ. Or enable the UCENTER settings in the background webmaster of DISCUZ under normal communication conditions, and copy the communication key. (The two keys are the same if the communication is normal. Otherwise, the communication will fail)
[Font =] [font =] then download the config_ucenter_default.php file in the CONFIG directory under the DISCUZ installation directory through FTP, and modify the 22nd Line
[Font =] define ('UC _ key', 'paste the communication KEY you just copied here '); // The communication KEY must be consistent with that of UCenter.
Save the file and upload it back to overwrite the original file.
Prerequisites: the communication between UCENTER and DISCUZ, UCENTER, and DEDE is successful. In the UCENTER application, we can see that the communication status is successful after the integration is successful.
The dede communication file is in the directory: include/common. inc. php

After the modification, log on to DEDE, and then log on to DISCUZ. If DEDE exits, DISCUZ also exits.
Log on to DISCUZ, and log on to DEDE. Log out in DISCUZ and log out in dede.

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.