php script which updates svn working directory

Posted by Sourabh on Stack Overflow See other posts from Stack Overflow or by Sourabh
Published on 2010-03-15T15:43:03Z Indexed on 2010/03/15 15:49 UTC
Read the original article Hit count: 324

Filed under:
|

Hi I want to write a php script which updates svn working directory

I tried with below code , but it does not work.I guess because the USER for php script is "apache" but for svn update it needs to be "homeuser"

    putenv("USERNAME=homeuser");
    putenv("HOME=/home/homeuser");  

    exec("svn update /home/homeuser/path/to/working/dir", $info); //svn update with full path

    print_r($info);

how to get around ?

© Stack Overflow or respective owner

Related posts about php

Related posts about svn