htaccess will CSV-Dateien einfach nicht als PHP behandeln

Irgendwelche Probleme mit XAMPP für Windows? Dann ist hier genau der richtige Ort um nachzufragen.

htaccess will CSV-Dateien einfach nicht als PHP behandeln

Postby pmw » 21. July 2005 12:19

Hallo!

Ich habe XAMPP 1.4.14 lite (incl. Apache 2.0.54 und PHP 5.0.4) installiert. Leider funktionieren die .htaccess-Dateien nicht richtig. Ich möchte gerne in einem Verzeichnis die CSV-Dateien durch PHP laufen lassen.

Wenn ich in der http.conf hinter "AddType application/x-httpd-php .php .php4 .php3 .phtml" ".csv" ergänze, dann lässt Apache alle CSV-Dateien durch PHP laufen. Da ich dies aber nur in einem Verzeichnis machen möchte, habe ich dies wieder rückgänig gemacht und in dem Verzeichnis eine .htaccess-Datei anglegt. Dort habe habe ich verschiedene Versionen ausprobiert, aber keine will funktionieren:

Code: Select all
AddType application/x-httpd-php .csv

Code: Select all
AddHandler application/x-httpd-php .csv

Code: Select all
AddType application/x-httpd-php .csv
AddHandler application/x-httpd-php .csv

Code: Select all
Options +Includes
AddType application/x-httpd-php .csv

Code: Select all
Options +Includes
AddHandler application/x-httpd-php .csv

Code: Select all
Options +Includes
AddType application/x-httpd-php .csv
AddHandler application/x-httpd-php .csv


Code: Select all
Options +Includes
AddType application/x-httpd-php .csv
AddOutputFilter INCLUDES .csv


Wie mache ich das richtig? Ich habe schon gelaubt, dass Apache bei mir .htaccess-Dateien ignoriert. Aber andere Befehle, wie z.B. "Deny from all" funktionieren.

Viele Grüße
pmw

Viele Grüße
Martin
pmw
 
Posts: 3
Joined: 21. July 2005 12:01

Postby Wiedmann » 21. July 2005 12:41

IMHO sollte das Erste schon passen:
Code: Select all
AddType application/x-httpd-php .csv


Evtl. spielt dir ja der Browsercache einen Streich. Ansonsten könntest du noch ForceType testen.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby pmw » 21. July 2005 13:22

Das war auch meine erste Idee, den Cache zu leeren. Es hat aber leider nicht funktioniert :( ForceType hat leider auch nicht geklappt:

Code: Select all
AddType application/x-httpd-php .csv
ForceType application/x-httpd-php
pmw
 
Posts: 3
Joined: 21. July 2005 12:01

Postby pmw » 21. July 2005 14:56

Ich habe den Fehler gefunden. "AllowOverride" war in der http.conf-Satei falsch konfiguriert.
pmw
 
Posts: 3
Joined: 21. July 2005 12:01


Return to XAMPP für Windows

Who is online

Users browsing this forum: No registered users and 31 guests