[101] Integrating GIT and Composer to XAMPP

Problems with the Windows version of XAMPP, questions, comments, and anything related.

[101] Integrating GIT and Composer to XAMPP

Postby Altrea » 28. June 2013 22:52

Hi folks,

This is a short step by step tutorial how to integrate git (source code management) and Composer (dependency management) in XAMPP without the need of any defined OS Path variables or registry keys (XAMPP philosophy).

tested environments
  • xampp-win32-1.8.2-0-VC9.zip with PortableGit-1.8.3-preview20130601.7z
  • xampp-win32-1.8.3-4-VC11.zip with PortableGit-1.9.4-preview20140611.7z
  • xampp-win32-1.8.3-5-VC11.zip with PortableGit-1.9.4-preview20140929.7z

0. Requirements

1. Installing XAMPP
  • extract your downloaded XAMPP .zip file to the root of your harddisk, so that you will get a folder c:\xampp or d:\xampp or etc.
  • open your \xampp\php\php.ini file in your favorite Editor and enable the php_openssl.dll module by removing the leading Semicolon from the line
    Code: Select all
  • start your XAMPP control panel by right clicking -> run as Administrator
  • click the [Shell] Button and accept that the xampp_shell.bat file gets created and close the Shell window again

2. Installing git
  • extract your PortableGit 7z file to \xampp\git
  • open the \xampp\xampp_shell.bat file in your editor
  • before the string %Path% add the following string
    Code: Select all
  • save the file and open the XAMPP Shell by clicking the [Shell] Button in your control panel
  • execute the following command to test git
    Code: Select all
    git --version
git should now work from any location with your XAMPP Shell

3. Installing Composer
  • in your XAMPP Shell navigate to your \xampp\php\ path
  • execute the command
    Code: Select all
    php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"
  • in \xampp\php\ create a new file composer.bat with the contents
    Code: Select all
    @php "%~dp0composer.phar" %*
  • to test composer type in XAMPP shell
    Code: Select all
    composer --version

best wishes,
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
AF Moderator
Posts: 7027
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: Windows 10 Pro x64

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 65 guests