php - Git Web Interface -


I am trying to work with the viewfinder interface for my projects.

Although I'm running on it, curious issues with PHP exec: <2 p> <2> These 2 Unix commands work from inside my viewgit / directory:

 / viewgit-> GIT_DIR = / usr / local / apache2 / htdocs / repo / Git Git Rev. list --header --max count = 1 c19e231ad87413798b6a1387a98ec814836fda1e 19e231ad87413798b6a1387a98ec814836fda1e c19e231ad87413798b6a1387a98ec814836fda1e tree 4351aa5fb93c3a093902577e5a58138280851152 parents 5099ea6747f8b8a532d153f0536e7be956532a33 author John.smith514-490-6597 1255 9 81013 -0400 Committer John.Smith514-490-6597 1255 9 81013-400 

and

 / viewgit-> GIT_DIR = / usr / local / apache2 / htdocs / repo / .git git diff c19e231ad87413798b6a1387a98ec814836f Da1e ^ .. c19e231ad87413798b6a1387a98ec814836fda1e diff --git a / bootstrap.php b / bootstrap.php index 6cc6336..857890b 100755 --- a / bootstrap.php +++ b / bootstrap.php @@ 17,7 +17,7 @ @); // ZEND LIBRARY - // -------------------------------------- + // - - ------------------------------------ // 1.7 // require_once "Zend / Loader.php"; // Zend_Loader :: registerAutoload (); 

While using php exec only gives an output for the first time:

 $ output_1 = array (); $ Output_2 = array (); $ Cmd_1 = "GIT_DIR = / usr / local / apache2 / htdocs / repo / .git git rev-list - header --max-count = 1 c19e231ad87413798b6a1387a98ec814836fda1e"; $ Cmd_2 = "GIT_DIR = / usr / local / apache2 / htdocs / repo / .git git diff c19e231ad87413798b6a1387a98ec814836fda1e ^ .. c19e231ad87413798b6a1387a98ec814836fda1e"; Exec ($ cmd_1, $ output_1, $ ret); Exec ($ cmd_2, $ output_2, $ ret); $ Output_1 actually has data from the command line ... However, $ output_2 is empty! 

What is the reason for this but any thoughts?

Thx

After a lot of reflection, I finally landed on a solution .. . ^ Escape. ^

Then I opened and replaced the code:

 $ text = git_diff ($ page ['project'], "$ hash ^", $ hash); 

with

 $ text = git_diff ($ page ['project'], "$ hash \ ^", $ hash); 

There can be similar problems anywhere, yet they have not landed yet.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -