apache zeigt nur quelltext an

N

nils11

nachdem ich es endlich geschafft hab, apache, php und den ganzen anderen kram zu installieren, kommt gleich ein neues problem:

wenn ich über apache eine php-datei öffne, wird mir nur der quelltext des programmes angezeigt.

an meiner miesen programmierung kanns nicht liegen, da auch programme, die nicht selbst erstellt worden sind, fehlerhaft angezeigt werden.

büdde helft mir :( .
 
wenn Apache den Quelltext anzeigt, dann liegt das daran, daß das Script nicht von PHP Interpretiert, und somit wie ein HTML-Dokument behandelt wird.
Müsste meiner Meinung nach entweder an einer falschen Einstellung in der httpd.conf liegen, oder Du hast PHP nicht richtig am Laufen.

hoffe das hilft


Dunsti
 
hm, ich hab einfach mal die httpd.conf angehängt. vielleicht ist ja jemand so nett und durchsucht sie nach fehlern. ich werd daraus nicht schlau. wäre echt nett.
 

Anhänge

  • apache.txt
    34,8 KB · Aufrufe: 193
nimm mal bei den folgenden zeilen den kommentar (#) raus:

PHP:
#AddType application/x-httpd-php .php
#AddType application/x-httpd-php-source .phps
... und...

PHP:
#AddType application/x-httpd-php3 .php3
#AddType application/x-httpd-php-source .phps

regards
 
hm...

also ich hab die "#" entfernt.

allerdings passiert nun folgendes: wenn ich nun eine php-datei öffnen will, kann ich sie nur downloaden und nicht ausfühen.
 
bei mir sieht das so aus:

PHP:
    #
    # AddType allows you to tweak mime.types without actually editing it, or to
    # make certain files to be certain types.
    #
    # For example, the PHP 3.x module (not part of the Apache distribution - see
    # http://www.php.net) will typically use:
    #
    #AddType application/x-httpd-php3 .php3
    #AddType application/x-httpd-php3-source .phps
    Action application/x-httpd-php /php4/php.exe
    Action application/x-httpd-cgi /perl/perl.exe
    #
    # And for PHP 4.x, use:
    #
    #AddType application/x-httpd-php .php
    #AddType application/x-httpd-php-source .phps

    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php .php4
    AddType application/x-tar .tgz

und damit laeuft das bei mir prima.

regards
 
och menno

es geht auch mit der neuen einstellung nicht.
er will die dateien immer runterladen.
 
Zurück