I'm maintaining an app made in symfony 1.4, I was correcting several things, including:
I have a local login that is ok, but in prod I get error 500, the url is register / sendContrast
Working on localhost, I get a message if it was successful or not:
I share a bit of the code: LoginSuccess.php
<div id="recuperarContrasenaForm" class="well" style="display: none; position: absolute; left: -10%; right: auto; z-index: 2">
<div class="text-center">
<div class="combopaginado">
<div class="panel-body text-left">
<form id="contraForm" name="contraForm" method="POST" action="<?php echo url_for("registro/nuevaContrasena") ?>">
<legend>Modificar contraseña </legend>
<table >
<tr>
<td >Usuario:</td>
<td>
<input type="text" id="usu" name="usu" class="form-control" />
</td>
</tr>
<tr>
<td>Contraseña anterior:</td>
<td>
<input type="password" id="password2" name="password2" class="form-control" />
</td>
</tr>
<tr>
<td >Contraseña nueva:</td>
<td>
<input type="password" id="password_nuevo" name="password_nuevo" class="form-control" />
</td>
</tr>
<tr>
<td>Repetir contraseña:</td>
<td>
<input type="password" id="password_nuevo_rep" name="password_nuevo_rep" class="form-control" />
</td>
</tr>
</table>
<br>
<div class="botoneraLogin pull-right">
<input id="recuperarContrasena" class="btn btn-success" value="Cancelar" style="width: 100px;"
onclick="click_showHide(this)"/>
</div>
<div class="botoneraLogin pull-left">
<input class="btn btn-success btn-block" type="submit" value="Modificar"/>
</div>
</form>
</div>
</div>
</div>
and the action method action_class.php
public function executeNuevaContrasena(sfWebRequest $request) {
$_SESSION["usuario"] = "";
unset($_SESSION["usuario"]);
$this->errors = array();
$this->notices = array();
if($request->getMethod() == "POST") {
$password = $request->getParameter("password2");
$usuario = $request->getParameter("usu");
$password_nuevo = $request->getParameter("password_nuevo");
$password_nuevo_rep = $request->getParameter("password_nuevo_rep");
// storedprocedure que me cambia la pass
$sql = "USU_ABM_USUARIO_PWD_RS('".$usuario."', '"
.$usuario."', 'M', '"
.$password."', '"
.$password_nuevo."', '"
.$password_nuevo_rep."')";
// ejecuto la query
$result = BackendServices::getInstance()->getResultsFromStoreProcedure($sql);
//print_r($result);exit;
if($result[0]['respuesta'] == "OK") {
$this->notices = array(0 => $result[0]['respues_exito']);
} else {
$this->errors = array(0 => $result[0]['respuesta']);
}
}
$this->setTemplate('login');
}
the routing.yml I have it like this:
sf_guard_signin:
url: /login
param: { module: preinscripciones, action: login }
// lo llamativo es que el module preinscripciones no existe.
sf_guard_signout:
url: /logout
param: { module: sfGuardAuth, action: signout }
sf_guard_password:
url: /request_password
param: { module: sfGuardAuth, action: password }
default:
url: /:module/:action/*
The password change does it correctly. But in production I get the 500 internal server error
message while local I get the correct error message.
Any idea what it can be? I can not find the error. Thank you very much
The log says:
[Mon Apr 03 12:12:23 2017] [error] [client 192.xxx.xx.xx] The template "loginSuccess.php" does not exist or is unreadable in ""., referer: http: / / "miurl" /