Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 494305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:29:05+00:00 2026-05-13T05:29:05+00:00

I have been following the post below trying to hook my SubVersion installation to

  • 0

I have been following the post below trying to hook my SubVersion installation to my Mantis bug tracker.

How To Integrate Subversion and Mantis

Everything works fine until the last line where it calls the Mantis checkin.php script and feeds it the message string that has been created in the script.

exec(CHECKIN . " <<< \"$message\"");

I understand the purpose of the line is to send the message string to STDIN which Mantis’ checkin.php reads in order to check for an appropriate matching string and update the Mantis tracking database.

Anyways, I know the above convention is for a Linux installation. My question is how would I use the PHP exec() function in a Windows environment to call the PHP script(checkin.php) and pass the string built in this program to STDIN.

NOTE: I would prefer not to change the logic in checkin.php to read from STDIN.

Thanks!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:29:05+00:00Added an answer on May 13, 2026 at 5:29 am

    I haven’t gotten any more posts, but after toying with the system() function, I was able to redirect a file as input to STDIN but was unable to pass a string of data. I had the option of doing something similar to a batch job in my PHP where I would write a temp file, and use that as input to STDIN, but since I was already using a batch file for the post-commit hook in SVN to call the PHP script I figured I would go ahead and just write the entire script there in the batch file.

    Here is my final solution for the SVN post-commit hook:

    post-commit.bat

    @ECHO off
    SETLOCAL
    
    SET REPOS=%1
    SET REV=%2
    
    SET PHP="C:\Program Files\PHP\php.exe"
    SET CHECKIN="D:\mantisbt-1.1.8\core\checkin.php"
    SET SVNLOOK="C:\Program Files\CollabNet\Subversion Server\svnlook.exe"
    
    SET LOGFILE=log%REV%.txt
    SET AUTHORFILE=author%REV%.txt
    SET OUTPUTFILE=output%REV%.txt
    SET CHANGEFILE=change%REV%.txt
    
    ECHO Author: > %AUTHORFILE%
    %SVNLOOK% author -r %REV% %REPOS% >> %AUTHORFILE%
    
    ECHO Log: > %LOGFILE%
    %SVNLOOK% log -r %REV% %REPOS% >> %LOGFILE%
    
    ECHO Files: > %CHANGEFILE%
    %SVNLOOK% changed %REPOS% %REV% >> %CHANGEFILE%
    
    ECHO Revision: %REV% > %OUTPUTFILE%
    %SVNLOOK% date %REPOS% -r %REV% >>  %OUTPUTFILE%
    TYPE %AUTHORFILE% >> %OUTPUTFILE%
    TYPE %LOGFILE% >> %OUTPUTFILE%
    TYPE %CHANGEFILE% >> %OUTPUTFILE%
    
    TYPE %OUTPUTFILE% | %PHP% %CHECKIN% 
    
    CALL DEL %LOGFILE%
    CALL DEL %AUTHORFILE%
    CALL DEL %CHANGEFILE%
    CALL DEL %OUTPUTFILE%
    

    This script updates a matching mantis ticket with a comment in the following format:

    Revision: 41
    2009-11-25 11:47:18 -1000 (Wed, 25 Nov 2009)
    Author: 
    jason
    Log: 
    Testing for checkin for TER #12345 which fixes Mantis issue 0000001.
    Files:
    U TANDEM/CAB/CABLONGD
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been looking at the following post and trying to apply it to mine
Hi I am quite new to php but i have been following some tutorials
Recently I have started playing with jQuery, and have been following a couple of
The following have been proposed for an upcoming C++ project. C++ Coding Standards, by
The rails books and web pages I've been following have all stuck to very
Alright, I have been doing the following (variable names have been changed): FileInputStream fis
Ok, I have been using the following script for over a year now to
I having trouble in dividing the HTML frames. I have been using the following
I have been searching everywhere for the following functionality in Lisp, and have gotten
People have been developing own solutions to the following problems: Consistent messaging frameworks for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.