You are here: Re: Command line output bypasses my capture! « PHP Programming Language « IT news, forums, messages
Re: Command line output bypasses my capture!

Posted by Andy Hassall on 08/20/07 20:39

On Mon, 20 Aug 2007 19:33:58 -0000, jdbartlett <contact@jdbartlett.com> wrote:

>I'm trying to capture output from a command line utility (XMLSec), but
>only get an empty result. If I call the script from the command line,
>I see XMLSec's output, but I can't seem to capture it!
>
>My PHP installation is working correctly and captures other command
>line output just fine, XMLSec is the only exception I've found. I've
>also tried a couple of other systems to confirm this behavior.
>
>Capture methods I've tried include:
>
>- shell_exec
>
>- exec, with and without output array
>
>- system
>
>- passthru combined with output buffering
>
>- fread-ing from popen('xmlsec1...', 'r')
>
>- proc_open
>
>I get the same result for each of these: an empty string (or array in
>the case of exec's $output).
>
>Any idea what's happening here? Any help would be much appreciated.

Is it writing to stderr (standard error) instead of stdout (standard output)?
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация