[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Problem with scripted SVN output

From: Hunkel, Manfred <M.Hunkel_at_t-systems.com>
Date: 2005-05-04 11:00:18 CEST

| -----Ursprüngliche Nachricht-----
| Von: Hunkel, Manfred
| Gesendet: Mittwoch, 4. Mai 2005 10:34
| An: mjvdveen@ai.rug.nl
| Cc: users@subversion.tigris.org
| Betreff: Re: Problem with scripted SVN output
|
|
| | > > But, on Slackware Slackware 9.1.0 and 8.1.0, my remote testing
| | > > environments, when I execute this php file in the browser I get NO
| | > > output back from svn.
| | > > When I run this file on this remote server in the console, I DO get back
| | > > the proper output. So it doesn't seem to be a PHP configuration problem.
| | > >
|
| It stilll might be. Did you compare the respective environments (Fedora vs.
| Slackware, httpd vs. shell)? I've seen this before. Things working OK in a shell
| environment doesn't prove they'll also work OK in httpd or vice versa.
|
| I'd suggest comparing the output of <?php phpinfo(); ?> on both installations, or
| try something like
|
| <? exec('/usr/local/bin/svn log --limit 1 /path/to/directory 2>&1', $output);
| print_r($output); ?>
|
| The latter redirects stderr to stdout for this command, so if anything gets written to
| stderr, it should get captured into $output as well.

Sorry, sorry, sorry... This might be rubbish :-( Ought have doen some research prior to
answering....

The php-docs about exec() say: "exec() executes the given command, however it does not output anything. It simply returns the last line from the result of the command."
                                                             ~~~~~~~~~~~~~~~

Does this explain the behaviour you observe? It seems that in order to capture all of a
command's output, you would have to use system() _and_ redirect the output of the
command run by system() to a file, then read the file and process the output...

|
| Cheers,
| -Manfred
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
| For additional commands, e-mail: users-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed May 4 11:03:28 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.