#21065 [Com]: shell_exec seems not to work properly if result was false.
| From: | dj-bj at gmx dot net | Date: | Fri, 20 Dec 2002 08:50:17 +0000 |
| Subject: | #21065 [Com]: shell_exec seems not to work properly if result was false. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-28086@lists.php.net to get a copy of this message | ||
ID: 21065
Comment by: dj-bj@gmx.net
Reported By: dj-bj@gmx.net
Status: Feedback
Bug Type: Reproducible crash
Operating System: Windows 2000 Server
PHP Version: 4.2.3
New Comment:
I installed this version using the old ini file - no errors execpt the
one reported.
Still, the result of shell_exec is not passed to the variable but
displayed on the page with added "
Content-type: text/html
X-Powered-By: PHP/4.4.0-dev
" after the error message.
In my script i control some nt services and therefor i tell shell_exec
to execute net start / net stop. If a service has already been started
and i attempt to start it again it returns the error "More help is
available by typing NET HELPMSG 2182." like in DOS Shell on Windows but
this error not passed to the variable.
Previous Comments:
------------------------------------------------------------------------
[2002-12-19 19:15:53] iliaa@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
------------------------------------------------------------------------
[2002-12-17 06:41:55] dj-bj@gmx.net
Running PHP 4.2.3 on Windows 2000 Server shell_exec works fine and
passes its output to the variable when the result of the executed
command is true.
However, if the command fails and the DOS-shell returns an error the
result is no longer availiable in the variable but is passed directly
to the page.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21065&edit=1