note 68647 added to function.shell-exec
| From: | Kishan at osu1 dot php dot net | Date: | Fri, 04 Aug 2006 17:27:27 +0000 |
| Subject: | note 68647 added to function.shell-exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115557@lists.php.net to get a copy of this message | ||
If you are on windows and has Cygwin, You can execute all your Cygwin binaries using shell_exec() as
follows:
<?
$result = shell_exec("C:\cygwin\bin\bash.exe --login -c
'/cygdrive/c/cygwin/bin/convert.exe --version'");
print($result);
?>
The key is the "--login" option which appends all the required common cygwin binary and
library paths to $PATH. Without this option some of the cygwin binaries that links to other
libraries ( Like ImageMagick binaries which links to X11 ) will not work and you may see errors like
"cygX11-6.dll not found, Could not start convert.exe"
----
Server IP: 64.71.164.2
Probable Submitter: 15.243.169.73
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.shell-exec.php
Edit -- https://master.php.net/note/edit/68647
Del: integrated -- https://master.php.net/note/delete/68647/integrated
Del: useless -- https://master.php.net/note/delete/68647/useless
Del: bad code -- https://master.php.net/note/delete/68647/bad+code
Del: spam -- https://master.php.net/note/delete/68647/spam
Del: non-english -- https://master.php.net/note/delete/68647/non-english
Del: in docs -- https://master.php.net/note/delete/68647/in+docs
Del: other reasons-- https://master.php.net/note/delete/68647
Reject -- https://master.php.net/note/reject/68647
Search -- https://master.php.net/manage/user-notes.php