No categories assigned

Environment Variables (Windows)

< Setup:Installation Guide
Revision as of 11:54, 5 April 2017 by WikiSysop (talk | contribs) (Enter Enbironmental Variables)


For using console commands for PHP ans MySQL in a comfortable way, some settings in the environment variables should be done. This document describes how to do this. 

Tips for this Document

  • Please, read this manual completely and work through the single installtion steps one after another. 

Figure out Paths

Please try to figure out in which paths of your Windows installation the following files are located: 

  • php.exe
  • mysql.exe

This document uses this paths as an example for the description:

  • C:\Program Files (x86)\PHP\php-5.6.30\php.exe
  • C:\Program Files\MariaDB 10.1\bin\mysql.exe

Enter Enbironmental Variables

  1. Press the key combination "Windows + R" to start the input request 
  2. Start the program "SystemPropertiesAdvanced.exe"
  3. Click at "Environment Variables"

    Setup:Setup windows environment variables 01.jpg
  4. Öffnen Sie im Bereich "Systemvariablen" die Variable "Path" mit einem Doppelklick

    Setup:Setup windows environment variables 02.jpg
  5. Bis Windows 2012: Fügen Sie in der Zeile "Wert der Variablen" zusätzlich direkt am Anfang der Zeile die Pfade zu php.exe und mysql.exe, getrennt durch Semikolon, ein.
    Am Beispiel der vorgenannt beispielhaft genannten Pfade also "C:\Program Files (x86)\PHP\php-5.6.30\;C:\Program Files\MariaDB 10.1\bin\;"

    Setup:Setup windows environment variables 03.jpg
  6. Ab Windows 2016: Fügen Sie zwei neue Einträge mit dem jeweiligen Pfadnamen hinzu

    Setup:Setup windows environment variables 04.jpg
  7. Schließen Sie alle Fenster mit Klick auf "OK"
  8. Starten Sie die Kommandozeile erneut

Nun sollten Sie ohne Probleme die Befehle "php" und "mysql" in der Kommandozeile aufrufen können.

Attachments

Discussions