dimanche 19 avril 2015

Php script not workable through ajax

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",
async: false

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= dbname=test user=user password=pass") or die('\Could not connect: ' . pg_last_error());

But if I run my script from the shell "php /.../pgResumeData.php", it's retrieving datas perfectly.

As well the pg_connect return "Query failed:" if I print pg_last_error($dbconn). So I can't get the full error ...

Any idea ?

Aucun commentaire:

Enregistrer un commentaire