|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-03-18 16:47 UTC] morten at nilsen dot com
I'm using php for shell scripting, and my current project is an indexer of smb shares. using shell commands (in this case smbclient) without the ability to interact, Creates a serious bottleneck, as it becomes neccessary to execute smbclient once for each folder on each share on each host on the network. well that's my two cents. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 15:00:01 2025 UTC |
I would also like to have a bidirectional popen. Currently, both myself and another poster on the popen page of idocs can only do this by creating two 'named' pipes on the fs. Then read and write to them. This is flawed though because of blocking on the named pipes by the readers/writers. *** oddly, if I popen('openssl', 'w'),write to it, then try to read from it then pclose() it spews the stdout from openssl into the browser. I was unable to assign this output to a variable either. Other posters at popen doc page seem to be trying to do this with popen('[some command]', 'r+') or 'w+', so this is definietly needed in PHP as it is in C. Sorry about the length.From the popen man page on Linux: DESCRIPTION The popen() function opens a process by creating a pipe, forking, and invoking the shell. Since a pipe is by definition unidirectional, the type argument may specify only reading or writing, not both; the resulting stream is correspondingly read-only or write-only. Suspending until Linux supports it. Derick