error with a random behaviour
Posted: Mon May 31, 2010 2:05 am
Hi,
First sorry I didn't know where to post, because, obviously, I can't identify where is the root cause of my bug between js script, php or the apache config.
I have on my website, a login webpage run with Ajax: no page refresh in case of wrong password, if ok then login and redirect.
My problem is that when Ajax is supposed to send the ID and password to the PHP script, sometimes it does (I can see it in the logs and the session is properly opened on the site) and other times, PHP script doesn't receive any input (in the logs I will find: "SELECT * FROM account_web WHERE username = ''")
I'd say that it occurs 50% of the time. It has been more than a week we have this error, wamp server was rebooted many times... Sometimes, during 10 minutes we try to connect in vain, it doesn't work and suddenly... connection !
To give you some spare indications, here is the js script run when clicking on button "connection":
the form (#login) sends data by POST to the script (IPay/signin/verify)
Because the error is random, we don't know where we can search, anyone got a clue ?
First sorry I didn't know where to post, because, obviously, I can't identify where is the root cause of my bug between js script, php or the apache config.
I have on my website, a login webpage run with Ajax: no page refresh in case of wrong password, if ok then login and redirect.
My problem is that when Ajax is supposed to send the ID and password to the PHP script, sometimes it does (I can see it in the logs and the session is properly opened on the site) and other times, PHP script doesn't receive any input (in the logs I will find: "SELECT * FROM account_web WHERE username = ''")
I'd say that it occurs 50% of the time. It has been more than a week we have this error, wamp server was rebooted many times... Sometimes, during 10 minutes we try to connect in vain, it doesn't work and suddenly... connection !
To give you some spare indications, here is the js script run when clicking on button "connection":
Code: Select all
<script type="text/javascript">
$(document).ready(function(){
$("#verify").bind("click",function(){
$("#verify").hide();
fVerify();
});
})
function fVerify(){
if(tmt.validator.validateForm(document.getElementById("login"))){
$.post(
"<{$smarty.const.APPLICATION_URL}>IPay/signin/verify",
$("#login").serialize(),
function(data){
if(data.value==true){
window.location = "<{$smarty.const.APPLICATION_URL}>IPay/users/orders/?lang=<{$hl}>";
}else if(data.value==false){
alert(data.message);
//Recaptcha.reload();
$("#verify").show();
}
},"json"
)
}
}
function fShowMessage(message,is_model){
if(is_model){
$("#thickbox").attr("href","#TB_inline?inlineId=message&modal=true&width=400&height=100");
}else{
$("#thickbox").attr("href","#TB_inline?inlineId=message&width=400&height=100");
}
$("#content").html(message);
$("#thickbox").click();
}
</script>
Because the error is random, we don't know where we can search, anyone got a clue ?