note 24813 rejected from function.system by betz
| From: | betz@php.net | Date: | Thu, 29 Aug 2002 06:32:16 +0000 |
| Subject: | note 24813 rejected from function.system by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-35966@lists.php.net to get a copy of this message | ||
How can I get a system command to work through a PHP shell script like a cvs ci using vi as
it's editor?
-----
#!/bin/php
<?php
...
cvs updates, create log > CHANGELOG for cvs modules
...
exec('cvs ci');
...
tar, gzip, mv cvs modules
...
?>
-----
After the exec('cvs ci') or passthru or whatever system operation is used I receive the
following error:
cannon@modwest:/htdocs/www$ ./ct.php
X-Powered-By: PHP/4.2.2
Content-type: text/html
cd /htdocs/www
./cvs.sh cb_common
cvs log: Logging .
cvs update: Updating .
cvs commit: Examining .
Vim: Warning: Output is not to a terminal
Ctrl-Z
[1]+ Stopped ./ct.php
cannon@modwest:/htdocs/www$ exit
logout
There are stopped jobs.
cannon@modwest:/htdocs/www$
I simply would like to add the cvs checkin messages on the fly as my script file says hey, I've
made changes what log message do you want to enter?
Am I missing the point of the STDOUT and STDERR notes of above?
Thanks for any ideas and solutions,
Cheers,
Michael