Manuelle PHP-Installation auf Windows

Web-Server wählen

  • IIS ist in Windows eingebaut. Auf Windows Server verwenden Sie den Server Manager, um die IIS-Funktion hinzuzufügen. Achten Sie darauf, das CGI-Rollen-Feature hinzuzufügen. Verwenden Sie auf dem Windows-Desktop die Systemsteuerung unter Software, um IIS hinzuzufügen. Siehe: » https://msdn.microsoft.com/en-us/library/ms181052%28v=vs.80%29.aspx?f=255&MSPPError=-2147217396 Für Desktop-Webanwendungen und Web-Entwicklung können Sie auch IIS/Express oder PHP Desktop verwenden.

    Beispiel #1 Kommandozeilen-Konfiguration von IIS und PHP

    
    @echo off
    
    REM Zip-Datei des PHP build von http://windows.php.net/downloads/ herunter laden
    REM Pfad des Ordners in den die PHP-Zip-Datei entpackt wurde (ohne abschließendes \)
    set phppath=c:\php
    
    
    REM Löschen der aktuellen PHP-Handler
    %windir%\system32\inetsrv\appcmd clear config /section:system.webServer/fastCGI
    REM Das folgende Kommando erzeugt eine Fehlermeldung, wenn PHP nicht installiert ist. Dies kann ignoriert werden.
    %windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /-[name='PHP_via_FastCGI']
    
    REM Aufsetzen der PHP-Handler
    %windir%\system32\inetsrv\appcmd set config /section:system.webServer/fastCGI /+[fullPath='%phppath%\php-cgi.exe']
    %windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /+[name='PHP_via_FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='%phppath%\php-cgi.exe',resourceType='Unspecified']
    %windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /accessPolicy:Read,Script
    
    REM Konfiguration der FastCGI-Variablen
    %windir%\system32\inetsrv\appcmd set config -section:system.webServer/fastCgi /[fullPath='%phppath%\php-cgi.exe'].instanceMaxRequests:10000
    %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%phppath%\php-cgi.exe'].environmentVariables.[name='PHP_FCGI_MAX_REQUESTS',value='10000']"
    %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%phppath%\php-cgi.exe'].environmentVariables.[name='PHPRC',value='%phppath%\php.ini']"
    
    
    Manuelle Konfiguration von IIS

  • Es gibt mehrere Versionen von Apache2 für Windows. Wir unterstützen ApacheLounge, aber zu den weiteren Optionen gehören XAMPP, WampServer und BitNami, die automatische Installationswerkzeuge bereitstellen. Sie können mod_php oder mod_fastcgi verwenden, um PHP auf Apache zu laden. Wenn Sie mod_php verwenden, MÜSSEN Sie einen TS-Build von Apache verwenden, der mit derselben Version von Visual C und derselben CPU (x86 oder x64) erstellt wurde. Wie man Apache2 manuell konfiguriert

Build wählen

PHP-Produktionsversionen herunterladen von » http://windows.php.net/download/. Bei den Snapshot- und Qa-Releases wurde bereits eine Menge getestet und optimiert, aber Sie können uns gerne dabei helfen, noch mehr zu tun. Es gibt 4 Arten von PHP-Builds:

  • Thread-Safe(TS) - Verwendung für Einzelprozess-Webserver, wie Apache mit mod_php

  • Non-Thread-Safe(NTS) - Verwendung für IIS und andere FastCGI-Webserver (Apache mit mod_fastcgi) und empfohlen für Befehlszeilen-Skripte

  • x86 - produktiver Einsatz von PHP 5.5 oder 5.6 oder 7.0.

  • x64 - produktiver Einsatz von PHP 7.0+, sofern es sich nicht um eine reine 32-Bit-Version von Windows handelt. 5.5 und 5.6 x64 sind experimentell.

add a note add a note

User Contributed Notes 1 note

up
3
klaussantana at gmail dot com
3 years ago
If you're installing PHP 8.0.1 as Apache http server module, in httpd.conf you must use "php_module" in "LoadModule" directive instead of versioned names like in previous versions (aka, php5_module, php7_module, ...). Make the directive as follow:

LoadModule php_module "/path/to/php8apache2_4.dll"

I cracked my head over this...
To Top