Problem with exec(). Help needed!
| From: | P dot Gertman at informgaz dot gazprom dot ru | Date: | Thu, 13 Mar 2003 08:41:28 +0000 |
| Subject: | Problem with exec(). Help needed! | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-18988@lists.php.net to get a copy of this message | ||
I'm using PHP for accessing PROGRESS database. Due to lack of native
interface between PHP and PROGRESS i'm forced to get the data like this:
......some code......
exec($_pro . ' -U '.$p_usertext.' -P '.$p_passtext.' -p
query.p',$pro_out,$pro_code);
......some code......
where
-> $_pro is a string containing calling parameters for PROGRESS console
client (they call it char client),
-> query.p is a PROGRESS 4GL script doing actual query and returning to
stdout some data in the form '$variable=value;' so it can be eval()'d in
PHP.
The problem appears when i dynamically compose some PROGRESS 4GL script in
PHP string then writing it to a file and then exec() above mentioned
sequence. PROGRESS works just fine - when i start its client app from pure
command line it returns all the data it should.
BUT same script but called from PHP via exec() -- PHP hangs and i'm
restarting Apache to get it working again. If i simply comment out the line
with exec() - all works fine again (of course without the data from
PROGRESS).
Configuration of server:
pentium III 500MHz with 384 MB of RAM / Windows 2000 Server SP3 (Russian).
Apache 1.3.26 + PHP 4.3.0 (module, not CGI)
our project has only 3 users at this time, so this hardware is powerful
enough :).