tags:

views:

74

answers:

1

Hi,

I have an exec() call wich never end, and my Apache/PHP process is blocked until timeout. It's an PostgreSQL database load like that

"C:\Program Files\PostgreSQL\8.3\bin"\psql --host 127.0.0.1 --dbname unitTests --file C:\ZendStd\www\voo4\trunk\resources\sql\base_test_projectx.pg.sql --username postgres 2>&1

It run fine in command line, but just block when called via php exec() function. I just want to understand why my exec() call never end, I think psql ask for a password but how I can print the output before the call end?

I use PHP 5.2.12 on Windows XP, with PGSql 8.3.

Thanks
Cédric

+2  A: 

You could use passthru() which directly outputs everything. Or you use some process control functions.

cweiske