Nö, du musst dem Apache mitteilen, dass er *.php-Dateien auch als PHP interpretiert.
Wenn du noch die Standardinstallation hast (so wie ich es dir gepostet habe), dann findest im Verzeichnis "/etc/apache2/sites-available" eine Datei "default".
Dort suchst du nach dem Abschnitt:
Code:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
DirectoryIndex index.php index.html index.htm
AllowOverride All
Order allow,deny
allow from all
Options +Indexes
</Directory>
Sollte so ähnlich aussehen, wichtig ist die obere Zeile (<Directory /var/www/>).
Dort fügst folgendes ein:
Code:
<IfModule mod_php5>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
</IfModule>
Das Ganze sollte dann ungefähr so aussehen:
Code:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
DirectoryIndex index.php index.html index.htm
AllowOverride All
Order allow,deny
allow from all
Options +Indexes
<IfModule mod_php5>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
</IfModule>
</Directory>
Zum Schluss die Datei speichern und den Apachen neu starten mittels:
Code:
/etc/init.d/apache2 restart