使用PHP通过CMD启动pg_restore不起作用

I try to restore a database (".backup" file) with pg_restore with cmd launch with PHP code but it doesn't work.

1- I give to my PHP variable all the cmd code

$cmd="cmd /c C:/Program Files/PostgreSQL/9.1/bin/pg_restore.exe -d ".$_POST['data2']." -i -h localhost -p 5432 -U ********** D:/backup/voirie.backup";

2- I launch it

exec($cmd);

My php work without result

enter image description here

On my server the process is launched

enter image description here

Other informations

  • In place of exec() I tested with system() and passthru()
  • I tested to create a batchfile from my php. This batchfile, work fine when launch him on the server but not from my PHP file
  • The generate code in $cmd was tested directly from CMD on the server and it works
  • For other codes on this server I use this who work fine: system("cmd /c C:/Python35-32/python.exe D:/python/serpent.py");
  • I tested with this quotes without result : $cmd='cmd /c "C:/Program Files/PostgreSQL/9.1/bin/pg_restore.exe" -d '.$_POST['data2'].' -i -h localhost -p 5432 -U ********** D:/backup/voirie.backup';