I have to deploy an application writhed on php, it was developed using a wamp server (on win). Now I have to deploy it on a apache2 debian server. The application works on the developers PC using wamp but can't get it to work on the debian server.
The problem is that all the grids (jquery grids) loads contents using ajax
grid.jqGrid({
datatype: "xml",
url:'../Controladores/cPedidos.php?action=lpd',
mtype: 'POST',
colNames:['FECHA','DEPOSITO','USUARIO'],
colModel:[
{name:'fecha_pedido',index:'fecha_pedido',width:120, sorttype: 'date'},
{name:'deposito',index:'deposito',width:500, editable:false},
{name:'usuario_id',index:'usuario_id',width:150, editable: false}
],
rowNum:10,
rowList:[10,20,40],
pager: '#paginacion',
gridview:true,
rownumbers:true,
ignoreCase:true,
sortname: 'fecha_pedido',
viewrecords: true,
sortorder: "asc",
caption:"Pedidos",
height: "100%",
subGrid : true,
subGridUrl: '../Controladores/cPedidos.php?action=lad',
subGridModel: [{ name : ['Codigo','Cantidad','Articulo','Estado','Categoria','Observaciones'],
width : [50,50,450,60,60,150] }],
editurl: '../Controladores/cPedidos.php?action=editar',
ondblClickRow: function(id, ri, ci) {
// edit the row and save it on press "enter" key
grid.jqGrid('editRow',id,true,null,null, 'clientArray');
},
onSelectRow: function(id) {
if (id && id !== lastSel) {
// cancel editing of the previous selected row if it was in editing state.
// jqGrid hold intern savedRow array inside of jqGrid object,
// so it is safe to call restoreRow method with any id parameter
// if jqGrid not in editing state
if (typeof lastSel !== "undefined") {
grid.jqGrid('restoreRow',lastSel);
}
lastSel = id;
}
}
}).jqGrid('navGrid','#pager',{add:false,edit:false},{},{},myDelOptions,{multipleSearch:true,overlay:false});
//grid.jqGrid('filterToolbar',{defaultSearch:'cn',stringResult:true});
$("#filtro").change(function(){
var valor = $("#filtro").val();
$("#tablapedidos").jqGrid().setGridParam({url:'../Controladores/cPedidos.php?action=lpd&filtro='+valor}).trigger('reloadGrid');
});
The problem is that nothing is loaded, using firebug I get that the post to the url is aborted.
if I enter the url directly on the browser (ff) I get an "The connection was reset" error, Chrome:"Error 324 (net::ERR_EMPTY_RESPONSE)". if I do it on the localhost of the developers pc I get the XML file, the url page create the XML file using echo, example (not complete)
function getArticulosPendientes() {
if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
header("Content-type: application/xhtml+xml;charset=utf-8"); } else {
header("Content-type: text/xml;charset=utf-8");
}
$et = ">";
echo "<?xml version='1.0' encoding='utf-8'?$et
";
echo "<rows>";
$lista = getListaArticulosPendientes($_POST);
$resultado = array();
for($i = 0; $i < count($lista); $i++) {
$fila = $lista[$i];
$dif = diferenciaCompradoPedido($fila['item_id']);
if($dif > 0) {
$fila['cantidad'] = $dif;
array_push($resultado, $fila);
}
else {
array_push($resultado, $fila);
}
}
for($a = 0; $a < count($resultado); $a++) {
$row = $resultado[$a];
$fecha = date("d/m/Y H:i", strtotime($row["fecha_pedido"]));
echo "<row id='". $row["item_id"]."'>";
echo "<cell>". $fecha."</cell>";
echo "<cell>". $row["cantidad"]."</cell>";
echo "<cell><![CDATA[". utf8_encode($row["descripcion"])."]]></cell>";
echo "<cell><![CDATA[". $row["categoria"]."]]></cell>";
echo "<cell><![CDATA[". $row["usuario_id"]."]]></cell>";
echo "<cell><![CDATA[". $row["estado"]."]]></cell>";
echo "<cell><![CDATA[". $row["observaciones"]."]]></cell>";
echo "</row>";
}
echo "</rows>";
}
any ideas