NYCPHP Meetup

NYPHP.org

[nycphp-talk] exec() funciton help

Joseph Crawford codebowl at gmail.com
Sat Aug 5 10:11:02 EDT 2006


Hello guys,

I created an svn log parser that will read the svn.log and then calculate
the % each person has put in, however i am trying to make it generate the
log if it does not exist, it keeps failing, here is what i have

$directory = '/home/httpd/vhosts/b2cdev.licketyship.com/httpdocs';
$file = $directory.'/svn.log';

while(!is_file($file) || !is_readable($file)) {
    chdir($directory);
    if(exec('/usr/bin/svn log -v > '.$file)) echo 'file created'; else echo
'failed'; exit;
    sleep(2);
}

i added the echo and exit for testing, everytime it seems to echo failed! :(

I am not sure what is going on because when i login as root and su to the
apache account and run svn log or the above command, it works fine.

both the getcwd and $directory are the same.

Any help will be appreciated.

Thanks,
-- 
Joseph Crawford Jr.
Zend Certified Engineer
Codebowl Solutions, Inc.
http://www.codebowl.com/
1-802-671-2021
codebowl at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20060805/299ab61d/attachment.html>


More information about the talk mailing list