Scherer: PHP Verknüpfung mit Apache

hab mir einen apache webserver und php installiert,
krieg's aber net gebacken, dass php dateien ausgeführt
werden.

was muss ich in der httpd.conf oder allgemein in der
konfiguration des apache ändern, damit dateien mit endung
.PHP (.PHP3/.PHP4) mit der php.exe ausgeführt werden?

scherer

  1. Servus

    Am Ende der httpd.conf folgendes dranhängen:
    hier ist der Pfad von PHP "C:/PHP", ändere diesen auf Deinen.

    soll PHP als Modul geladen werden:
    LoadModule php4_module C:/PHP/sapi/php4apache.dll
    AddModule mod_php4.c
    AddType application/x-httpd-php .php .phtml
    AddType application/x-httpd-php-source .phps

    oder als .exe:
    ScriptAlias /php/ "c:/php/"
    AddType application/x-httpd-php .php .phtml
    Action application/x-httpd-php "/php/php.exe"

    danach suche nach "DirectoryIndex index.htm index.html" (normalerweise in Zeile 320 der hhtpd.conf und hänge "index.php index.phtml" hinter dran

    Restart von Apache und schon läuft's.

    Wenn nicht, sieh' mal im Schwesterprojekt SelftPHP nach.

    Grüße, Jörg

    1. juhu!!  es klappt  =)   dankeschön..

      hatte die ganze zeit bei
      ScriptAlias /php/ "c:/php/"
      den letzten slash vergessen..

      scherer

      Servus

      Am Ende der httpd.conf folgendes dranhängen:
      hier ist der Pfad von PHP "C:/PHP", ändere diesen auf Deinen.

      soll PHP als Modul geladen werden:
      LoadModule php4_module C:/PHP/sapi/php4apache.dll
      AddModule mod_php4.c
      AddType application/x-httpd-php .php .phtml
      AddType application/x-httpd-php-source .phps

      oder als .exe:
      ScriptAlias /php/ "c:/php/"
      AddType application/x-httpd-php .php .phtml
      Action application/x-httpd-php "/php/php.exe"

      danach suche nach "DirectoryIndex index.htm index.html" (normalerweise in Zeile 320 der hhtpd.conf und hänge "index.php index.phtml" hinter dran

      Restart von Apache und schon läuft's.

      Wenn nicht, sieh' mal im Schwesterprojekt SelftPHP nach.

      Grüße, Jörg