You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Kamal <ka...@gmail.com> on 2006/07/17 15:14:30 UTC

Call svn executable from php on windows hangs forever

Hi everybody.
I don't know if this is the right ML to write to, tell me if you think
I should ask somewhere else please.

I'm trying to call the svn.exe executable from a php script (I know
there is php_svn and other ways but now I need to test this).
For example a simple

<?php
chdir('c:\\local_working_copy');
$output = shell_exec('svn help');
?>

works as expected printing the help message. If execute "svn ls"
instead of "svn help" it just waits forever until I kill the process
manually.
Obviously the same command from the command line works as expected, I
use svn+ssh and have configured the SVN_SSH env var with password too
(just to be sure it's not an authentication problem).
My svn client is 1.3.2 (I installed the last one I think), ssh client
is plink.exe 0.58, OS is windows 2k pro sp4 patched and webserver
Apache/2.2.2 + PHP/5.1.4 (xampp 1.5.3a).

My sensation is that if called from command line it's not interactive,
if called from webserver it expects something else forever...

If someone can help me in any way I appreciate it very much, thank you.

-- 
Kamal

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

Re: Call svn executable from php on windows hangs forever

Posted by Kamal <ka...@gmail.com>.
2006/7/18, Gavin Lambert:
> Is your webserver running as a different user?  If so, it's probably
> missing the appropriate credentials, so it's prompting you for them.
>
> You should be using the --non-interactive options when you don't want it
> to be interactive, incidentally.

Thank you for your answer. I don't know what's really happening, but I
tend not to waste time too much on windows.
The real solution for me was to change the authentication scheme, I
insisted in using ssh when it was not the right environment. Now I'm
using a dedicated svnserve in daemon mode just to serve the apache
user (authenticated with --username and --password) from everywhere in
the local network. Why try to use a real account when the apache user
isn't a "real" account? I had to change my view a little bit.

Bye

-- 
Kamal

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

RE: Call svn executable from php on windows hangs forever

Posted by Gavin Lambert <ga...@compacsort.com>.
Quoth Kamal <ma...@gmail.com>:
> I'm trying to call the svn.exe executable from a php script
> (I know there is php_svn and other ways but now I need to
> test this). For example a simple
> 
> <?php
> chdir('c:\\local_working_copy');
> $output = shell_exec('svn help');
>> 
> 
> works as expected printing the help message. If execute "svn
> ls" instead of "svn help" it just waits forever until I kill
> the process manually. Obviously the same command from the
> command line works as expected, I use svn+ssh and have
> configured the SVN_SSH env var with password too (just to be
> sure it's not an authentication problem). My svn client is
> 1.3.2 (I installed the last one I think), ssh client is
> plink.exe 0.58, OS is windows 2k pro sp4 patched and
> webserver Apache/2.2.2 + PHP/5.1.4 (xampp 1.5.3a).
> 
> My sensation is that if called from command line it's not
> interactive, if called from webserver it expects something else
> forever... 

Is your webserver running as a different user?  If so, it's probably
missing the appropriate credentials, so it's prompting you for them.

You should be using the --non-interactive options when you don't want it
to be interactive, incidentally.

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