0
I am using the following code so that after the login and password it is directed to the respective page. Locally it works, but when I go up to the server, it’s giving Chrome error:
ERR_TOO_MANY_REDIRECTS
And in Firefox:
This problem may be caused by disabling or refusing to accept cookies.
As I said earlier, locally it works perfectly. The code I’m using for redirect is:
<script type="text/javascript">
$(document).ready(function(){
$('#login-form').submit(function() {
data = $('#login-form').serialize();
$.post("validar.php",{
d: data,
},
function (d) {
console.log(d);
if(d == 1){
$('#myModal').modal('show');
}else{
var redirecionar = "sistema/";
$(window.document.location).attr('href',redirecionar);
}
});
return false;
});
});
</script>
It is worth remembering that the directory system/ exists.
And there’s some page
index
in that directory ?– Isac
Hello Isac. Yes you have.
– user24136
Strange... when I tried to access the phpmyadmin by the server, is giving this error: Error During Session start; Please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser. session_start(): open(SESSION_FILE, O_RDWR) failed: No such file or directory (2)
– user24136
I’m sorry if this error is from the server, but I need to have this security to have arguments to go to them.
– user24136
What are the permissions of this directory on the server?
– Isac
I can not inform you, because it is a hosting that I am using. It worked and accessed quietly. The server is not local, but remote.
– user24136
phpmyadmin is back, but the error shown in the code continues.
– user24136