Error 500 when logging in working with mvc

0

I have this form in html, the login I do without jquery or ajax. Command of this form by post:

<form class="form-horizontal" method="POST" style="vertical-align: central;" action="views/procesologin.php">
    <p>ACCESO AL SISTEMA</p>
  <div class="form-group">
  <div class="row">
    <label for="inputEmail3" class="col-sm-2 control-label">Nombre</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" name="usuario" placeholder="USUARIO"/>
    </div>
    </div>
    <div class="row">
      <label for="inputEmail3" class="col-sm-2 control-label">Contraseña</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" name="pass" placeholder="PASS"/>
    </div>
    </div>
  </div>
  
  <input type="submit" value="guardar"/>
     

</form>

And in procesologin.php:

<?php
session_start();
require_once ("C:\xampp\htdocs\gestionweb\models\claseLogin.php");


    $U1=new Login();
    $usuario=$_POST['usuario'];
    $pass=$_POST['pass'];
    $arrayu=$U1->User($usuario,$pass);
   
         if (count($arrayu)>1){ 
            
                foreach ($arrayu as $n){
           

         
            $_SESSION['usuario']=$n['nombre']; 
            $_SESSION['idlog']=$n['iduser']; 
               
                }
  
     
        header ("Location : ../index.php?controller=template&action=index");
            }
       

?>

In the main index the first time the login appears;

<?php
session_start();
require_once ($_SERVER['DOCUMENT_ROOT'].'/gestionweb/routes.php');

if (isset($_SESSION['usuario'])){

    


	if (isset($_POST['controller'])&&isset($_POST['action'])) {

		$controller=$_POST['controller'];
		$action=$_POST['action'];
   
        call($controller,$action,$id);		
	}else{
	   call("login","index",0); 
	}
}else{
    echo "no esta logueado en el sistema";
    call("login","index",0);
}
?>	

But then I get the 500 error: ** Server error!

An internal error occurred on the server and your request could not be completed. An internal error occurred on the server and your request could not be completed. Either the server is overloaded or there has been a failure in the execution of a CGI program.

If you think this is a server error, please tell the portal administrator. Error 500 **

    
asked by Caruso 27.11.2018 в 19:34
source

0 answers