LAMP-stack PHP funktioniert nicht (Ubuntu 13.10 / Apache 2.4.6)

Probleme mit PHP auf meinem LAMP-stack: PHP-Scripte werden nicht geparst überhaupt. Ich setup von Ubuntu 13.10 auf klare Maschine... Und nun sehe ich es nur löschen, HTML von der Seite, aber PHP-tags sind wie text -

Eigentlich ist das, was ich habe:

$ /usr/sbin/apache2ctl status | grep Version

Server Version: Apache/2.4.6 (Ubuntu) PHP/5.5.3-1ubuntu2.1

$ tail-n 1 /var/log/apache2/error.melden Sie

[Sat Dec 14 19:33:16.307184 2013] [core:notice] [pid 15457] AH00094: Command line: '/usr/sbin/apache2'

$ apache2ctl -S

VirtualHost configuration:
*:80                   is a NameVirtualHost
         default server videosurgeon.ll (/etc/apache2/sites-enabled/vs.conf:1)
         port 80 namevhost videosurgeon.ll (/etc/apache2/sites-enabled/vs.conf:1)
         port 80 namevhost videosurgeon.ll (/etc/apache2/sites-enabled/vs.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/lock/apache2" mechanism=fcntl 
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used

$ apache2ctl -M | grep php

 php5_module (shared)

$ cat /work/VS/httpdocs/test.php

<? phpinfo(); ?>

$ cat /etc/apache2/sites-enabled/vs. conf

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName videosurgeon.ll

    DirectoryIndex index.php index.html index.htm

    DocumentRoot /work/VS/httpdocs/

    <Directory /work/VS/httpdocs/>
    Options FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,alert, emerg.
    LogLevel notice

    CustomLog /var/log/apache2/access.log combined
</virtualHost>

$ /usr/bin/php --version

PHP 5.5.3-1ubuntu2.1 (cli) (built: Dec 12 2013 04:22:11) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies

UPD.1: es mir apache2.conf : http://ge.tt/6Yd8Jj91/v/0


UPD.2: Heute habe ich умут versucht, alles entfernen und neu installieren Sie die LAMPE. Das Ergebnis ist genau das gleiche: PHP nicht funktioniert.

sudo apt-get install lamp-server^

Aber auch interessant, dass phpmyadmin funktioniert einwandfrei. Ich installieren Sie es einfach so:

sudo apt-get install php5 php5-cgi phpmyadmin 

Es stellt sich heraus, dass es (in phpmyadmin) sind einige Einstellungen, geben Sie PHP nutzen zu können...

  • Sind Sie hure modphp installiert ist. Sie könnten möglicherweise installiert haben, die nicht-apache php-version: versuchen apt-get install -y apache2-mod-php5 ; service apache2 restart
  • Wenn der obige Vorschlag fehlschlägt, können Sie auch versuchen, die "LAMP server" - option in tasksel ($ sudo tasksel) kümmert.
  • Ich bin mit dem gleichen Problem. Aufbau einer Entwicklungsumgebung unter debian. hast du eine Lösung finden, um dieses problem in das Ende?
InformationsquelleAutor xiaose | 2013-12-14
Schreibe einen Kommentar