Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

php - Subversion Hook wont run 'svn update' when run automatically but will when run from bash prompt -


i have created subversion hook various things including sending out emails , updating working copy on server. when run bash propt works perfectly. when run through either tortoisesvn or netbeans on commit, emails etc sent update not executed, no errors appear either. file php file , using backtick method run bash commands. other bash commands run compose emails isn't issue.

here line should run update , log outcome. $location pulled database of working copy locations.

$update_output = `/usr/local/bin/svn update /home/$location >> update.log`; 

thanks

james

edit, more complete script:

#!/usr/local/bin/php <? $repos = $argv[1]; $rev = $argv[2];  $output[] = `/usr/local/bin/svnlook dirs-changed -r $rev $repos`;  foreach($output $line) {         preg_match("$([^/]+)$", $line, $array);         $projects[] = $array[0]; }  $projects = array_unique($projects);  $mysqli = new mysqli('localhost', 'svn_user', 'pringles', 'svn_maindb');  if ($mysqli->connect_error) {     die('connect error (' . $mysqli->connect_errno . ') '             . $mysqli->connect_error); }  foreach($projects $project) {         $query = "select * project name = '$project' limit 1";         $result = $mysqli->query($query);         $row = $result->fetch_assoc();         $proj_id = $row['id'];         $location = $row['location'];         if(!empty($location))         {                 $update_output = `/usr/local/bin/svn update /home/$location >> update.log`;         }          /* below line works when script run hand */         $test = `/usr/bin/lessecho test >> /home/svn/repo/hooks/update.log`;           /* grab user db , call send_email user */ }  function send_email($repos, $rev, $programmer, $email) {         $author = `/usr/local/bin/svnlook author -r $rev $repos`;         $message .= "project committed $author         comments:         ";         $message .= `/usr/local/bin/svnlook log -r $rev $repos`;         $message .= "         ===========list of changes========          u = updated         = added         d = deleted          ";         $message .= `/usr/local/bin/svnlook changed -r $rev $repos`;          /* compose , send email */ } 

root 4231 0.0 0.0 61180 748 pts/0 s+ 17:09 0:00 grep svnserve

is because ran root? if running root there should no permissions issue?


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -