SESSION and verification code: apache is installed on the server.
The website is developed using the ThinkPHP framework and comes with a verification code image.
The member registration page uses the verification code and the html page:
Code used by the program to determine the verification code image during registration:
If ($ _ SESSION ['verify ']! = Md5 ($ _ POST ['verify '])
Exit ('verification code error! ');
The program should be fine, because it is normal for me to test locally and on the server.
However, someone said that the verification code was entered correctly during registration. The result showed that the verification code was incorrect!
He said it would not work with IE or FF browsers ......
I went up to test that I had registered a new member. others registered members were also successful.
I don't know what's wrong with me?
I doubt the web environment: Is there a problem with apache + php?
Reply to discussion (solution)
Individual cannot
It indicates that the problem is related to the client, or it is all on the client.
Individual cannot
It indicates that the problem is related to the client, or it is all on the client.
Well, this friend registered on another computer, but the verification code was incorrect.
Strange, will it be a network problem on the client side? As a result, the verification code image is different from the actual one.
Add one sentence
If (isset ($ _ SESSION ['verify ']) & $ _ SESSION ['verify']! = NULL & $ _ SESSION ['verify ']! = ''){
// Continue to judge whether the verify value is equal;
} Else {
Echo 'session [verify] value does not exist or is empty, check whether the server's session function is normal ';
}
Add one sentence
If (isset ($ _ SESSION ['verify ']) & $ _ SESSION ['verify']! = NULL & $ _ SESSION ['verify ']! = ''){
// Continue to judge whether the verify value is equal;
} Else {
Echo 'session [verify] value does not exist or is empty, check whether the server's session function is normal ';
}
Well, this method is good. let me try it.
If the SESSION ['verify '] value does not exist or is null, you can determine whether it is a server problem.
His browser settings problems.
Add one sentence
If (isset ($ _ SESSION ['verify ']) & $ _ SESSION ['verify']! = NULL & $ _ SESSION ['verify ']! = ''){
// Continue to judge whether the verify value is equal;
} Else {
Echo 'session [verify] value does not exist or is empty, check whether the server's session function is normal ';
}
Indeed, a friend logged on to the system and asked "the session [verify] value does not exist or is empty. check whether the session function of the server is normal"
Is there a problem with the server?
The server is installed with apache
The website is developed using the ThinkPHP framework and comes with a verification code image.
The member registration page uses the verification code and the html page:
During registration, the program judges the generation of the verification code image ......
The owner can check whether cookies are disabled in browsers that cannot be correctly operated.
The owner can check whether cookies are disabled in browsers that cannot be correctly operated.
I have seen some people say that "cookies and sessions in PHP are not necessarily related"
So what should I do now be a problem with the web environment? If so, I plan to change the environment
Firefox works normally. Other browsers show that the session is not defined,