I'm using the next code to call an RPG procedure on a library of my I5OS:
(I have to send a parameter to this procedure (a 8 digits number))
$desc = array (array ("Name" => "pedido", "type" => I5_TYPE_CHAR, "length" => "9" ) );
$prog = i5_program_prepare("LIBRERIA/PROC.RPG", $desc);
$desc2 = array('pedido'=>'00654321');
$res = i5_program_call($prog, $desc2);
if (!$rethdl) die("<br>Program call error. Error number=".i5_errno()." msg=".i5_errormsg());
The connection with the i5 is already done and working.
When I reload my page so i can see the results of this it takes too much time and then shows me an error message:
502 Bad Gateway: The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.
Does anybody know how can I fix this or what am I doing wrong?
I really need this to work as soon as possible.