I have an issue with previously working script and I don't understand what is happening.
To make it simple I have a html dashboard. This dashboard call php script like this
var jsonData = $.ajax({
url: "script/pgResumeData.php",
dataType:"json",
async: false
}).responseText;
It was working perfectly until I migrate the machine. I snapshot my volume then reboot on another machine, everything is working except that the pg_connect of the php is not working !
$dbconn = pg_connect("host=127.0.0.1 dbname=test user=user password=pass") or die('Could not connect: ' . pg_last_error());
But if I run my PHP script from the shell "php /.../pgResumeData.php", it's retrieving datas perfectly.
As well the pg_connect return "Query failed:" in the console if I print pg_last_error($dbconn). So seems that I can't get the full error ...
Any idea ?
Edit : Same error if I reach the PHP script with a Browser, but working by shell.