Zhimeng dedecms background verification code error set and solution

Source: Internet
Author: User
Tags php and browser cache file permissions

Zhimeng dedecms background verification code error

I believe many users may encounter problems such as failure to display verification codes or continuous errors when logging on to the background of Zhimeng. How can this problem be solved. Here are a few tips and reasons.

(1) the space is full.

The first reason is that it is generally very difficult, that is, whether your host space is full, which is basically the cause of this problem.

(2) clear cache

Just like a browser, if you visit a website for a long time, the browser automatically identifies the website as a frequently accessed website and stores it in the cache. In this case, the result is that the verification code you entered is incorrect. So how can we clean up the cache? It's easy to go to your host space or FTP management. In the data/sessiondirectory, all files except the index.html homepage file are deleted. Of course, the browser cache must be cleared first.

(3) modify configuration parameters

Data/safe/inc_safe_config.php open the first line, $ safe_gdopen = '1, 2, 3, 4, 5, 6'; change
$ Safe_gdopen = '1, 2, 3, 4, 5'; remove 6 to disable the backend verification code option. (This is a permanent method, which means that your verification code has never been used .)

(4) modify the PHP version

Here, the modified version refers to a version downgrade, not a version upgrade. How can we modify it? This is because the control panel on each space is different. Here, I will use the cpanel control panel of host 91 as a demonstration.

Click the PHP version.


Then select the version. Note that the version of Zhimeng is continuously updated. The result is that the old version is more stable, so here we will adopt a version downgrade method to solve this problem. The new version of php and dede are usually not compatible with some settings.


(5) Modify file permissions

Another solution is to modify the folder permissions of the session file as follows.

Click Perms and change the permission to 777.




Solution to incorrect login verification code in the background of Zhimeng

(1) Check whether the VM space is sufficient. (this is not feasible because my VM has no problems ).

(2) the background verification code error may be caused by caching and cannot be logged on. Use ftp to delete all session files except index.htm in the data/sessiondirectory, and then clear the cache in the local IE browser. (Not feasible)

(3) open the first line of data/safe/inc_safe_config.php, and change $ safe_gdopen = '1, 2, 3, 4, 5, 6'
$ Safe_gdopen = '1, 2, 3, 4, 5'; remove 6 to disable the backend verification code option. (Feasible, the verification code does not work, and it is uncomfortable ).

(4) dede system reinstallation (not feasible)

(5) system backup recovery (not feasible)

(6) database recovery (not feasible)

(7) modifying the common. func. Php file on the Internet (not feasible)

(8) modify sessions. cookie_path in php. ini (this is not feasible and the space provider does not allow modification );

(9) after logging in according to (3), go to System -- verify security settings -- enable system verification code,
Remove background login and other such as Member Login, member registration, etc., (feasible, like (3), the verification code does not work, as if you have a sore, build a cloth, it's hard to let others see it)

(10) data/session permission, changed to 777 (not feasible)

(11) reduce the php version of the space provider (godaddy) from 5.4.23 to 5.2.17.
(Feasible). The problem is completely solved. It is estimated that the space provider has updated the system recently. The new version of php is incompatible with some dede settings.





Zhimeng Dedecms background login verification code not displayed or always prompts an error

The Dede backend verification code is not displayed or is abnormal in three cases. Next we will analyze it one by one.


Dede background verification code not shown in scenario 1


Dede background verification code is not displayed. Case 2


Dede background verification code not displayed case 3


General solution-cancel the background verification code function

The source code of the PHP file cannot be modified in the background because no verification code is provided:

Method 1:

Open dede/login. php and find the following code:

If ($ validate = "| $ validate! = $ Svali) & preg_match ("/6/", $ safe_gdopen )){

ResetVdValue ();

ShowMsg ('verification code is incorrect! ', 'Login. Php );

Exit;

}

Replace the first line with if (false ){

Solve the problem. Go directly to the background without entering the verification code.

Method 2

Open data/safe/inc. safe. config. php

Delete 6 from code $ safe_gdopen = '1, 2, 3, 4, 5, 6, 7 ';.

Dede background verification code not shown in case 1 analysis

The verification code requires the GD Library. Check whether your environment has enabled the GD Library.
 

Dede background verification code not displayed case 2 analysis

The verification code only shows the background and does not show letters

Open the verification code generation file Include/vdimgck. php

Find

For ($ I = 0; $ I <$ rndcodelen; $ I ++)

{

$ Bc = mt_rand (0, 1 );

$ Rndstring [$ I] = strtoupper ($ rndstring [$ I]);

$ C_fontColor = $ fontColor [mt_rand (0, 4)];

$ Y_pos = $ I = 0? 4: $ I * ($ font_size + 2 );

$ C = mt_rand (0, 15 );

@ Imagettftext ($ im, $ font_size, $ c, $ y_pos, 19, $ c_fontColor, $ font_file, $ rndstring [$ I]);

$ Lastc = $ rndstring [$ I];

}

The Imagettftext () function is not successfully executed. As a result, the verification code only displays the background and no letters.

The specific cause is the incorrect font file path. Solution

1. Check whether the font file in include/data/fonts/is ggbi. ttf by default.

2 Add the following code to the line for ($ I = 0; $ I <$ rndcodelen; $ I ++:

$ Font_file = str_replace ("\", "/", $ font_file );

That is, replace the backslash in the path of the font file with the slash, because we know that the backslash has the conversion character function,

$ Font_file: \ appserv \ www system error. The backslash is used as an escape character. As a result, $ font_file is not a path. Therefore, the Imagettftext () function always returns an error.

Add $ font_file = str_replace ("\", "/", $ font_file);

Dede background verification code not displayed case 3 analysis

The Include/data/words/words.txt file does not exist.

Solution 1 copy one

Solution 2


Find the code 'word _ type' => (int) $ safe_codetype, // 1: Number 2: English 3: word

Change to 'Word _ type' => 1 (or 2). The verification code is a number or an English

 
The Dede background verification code does not show all the conditions.

In addition, if the verification code is displayed on the background, but an error is always prompted when you enter the correct verification code, you are sure that your space is full. We recommend that you go to the space control panel to check the remaining space capacity!

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.