ubuntuusers.de

Apache2 mit PHP - phpinfo.php Problem

Status: Gelöst | Ubuntu-Version: Server 20.04 (Focal Fossa)
Antworten |

undine

Anmeldungsdatum:
25. Januar 2007

Beiträge: 3400

Hallo User,

warum wir mir nur Text im Webbrowser angezeigt?

https://wiki.ubuntuusers.de/PHP/

/var/www/html/phpinfo.php

<?php
phpinfo();
?>

Aufruf mit "https://IP-Adresse/phpinfo.php"

PHP ist installiert und konfiguriert.

ls -la
total 24
drwxr-xr-x 2 root root  4096 Mar 16 10:10 .
drwxr-xr-x 3 root root  4096 Mar 16 06:53 ..
-rw-r--r-- 1 root root 10918 Mar 16 06:53 index.html
-rw-r--r-- 1 root root    21 Mar 16 10:00 phpinfo.php

Was fehlt meinem Server?

index.html wird einwandfrei angezeigt.

php -i

https://pastebin.com/B4HVChzG

pastebin funktioniert leider nicht-

Infos werden mit "php -i" ausgegeben.

Greetz

undine

Gelöst mit:

sudo apt-get install libapache2-mod-php8.1
sudo service apache2 restart
Antworten |