PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Apache2 und PHP5 - Konfigprobleme



monsterherz
23.02.06, 21:12
Wenn ich den localhost aufrufe kommt nur das Verzeichnis apache2-default
Beim Aufruf des Verzeichnisses startet der Server korrekt. Nur PHP-Scripte werden nicht ausgeführt. Zur Gruppe www-data habe ich mich hinzugefügt.
Wenn ich eine info.php aus dem Apache-Root-Verzeichnis aufrufe kommt das Download. Also muss doch irgend etwas mit der Modul-Aktivierung nicht stimmen?

Hat jemand einen Tipp wo der Fehler liegt? :confused:

danke
monsterherz
------------------------------------------------------------
Auszug der apache2.conf:

ServerRoot "/home/michi/www"
LockFile /var/lock/apache2/accept.lock
PidFile /var/run/apache2.pid
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 20
MaxRequestsPerChild 0
</IfModule>


<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
<IfModule perchild.c>
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0
AcceptMutex fcntl
</IfModule>

User www-data
Group www-data

# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf

# Include all the user configurations:
Include /etc/apache2/httpd.conf

# Include ports listing
Include /etc/apache2/ports.conf

# Include generic snippets of statements
Include /etc/apache2/conf.d/[^.#]*

TypesConfig /etc/mime.types
DefaultType text/plain
HostnameLookups Off
IndexOptions FancyIndexing VersionSort
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php5
AddType application/x-httpd-php-source .phps
AddType application/x-tar .tgz
# To use CGI scripts outside /cgi-bin/:
AddHandler cgi-script .cgi
Include /etc/apache2/sites-enabled/[^.#]*

Tomek
23.02.06, 21:38
apt-get install libapache2-mod-php5
a2enmod php5
/etc/init.d/apache2 restart

monsterherz
24.02.06, 08:07
leider keine Chance:

root@laptop:/home/michi# apt-get install libapache2-mod-php5
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut... Fertig
libapache2-mod-php5 ist schon die neueste Version.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 1 nicht aktualisiert.
root@laptop:/home/michi# a2enmod php5
This module is already enabled!
root@laptop:/home/michi# /etc/init.d/apache2 restart
* Forcing reload of web server (Apache2)... [Fri Feb 24 09:00:48 2006] [warn] module php5_module is already loaded, skipping[Fri Feb 24 09:00:49 2006] [warn] module php5_module is already loaded, skipping [ ok ]
root@laptop:/home/michi#

Nach meinem "Gefühl" ist die Warnung das php5 Module already loaded ist, nicht schlimm - aber vielleicht liegt dort der Fehler?

Tomek
24.02.06, 08:30
Hast du die Anweisung um das PHP5-Modul zu laden schon irgendwo manuell eingetragen? Wenn ja, entferne das.

monsterherz
24.02.06, 08:39
Hast du die Anweisung um das PHP5-Modul zu laden schon irgendwo manuell eingetragen?
Nein, nicht das ich wüsste. Es gibt nur eine php5.conf
kommen die php5 und apache2.conf sich ins Gehege?

hier die php5.conf:

<IfModule mod_php5.c>
AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps
</IfModule>

Tomek
24.02.06, 08:48
Deine Einträge für die PHP5-Konfiguration sind in der apache2.conf überflüssig. Mit den Installationsbefehlen, wie ich sie gepostet habe, geht Apache und PHP einwandfrei, und das ohne weitere Schritte.

Du könntest die Installation erneut versuchen:

apt-get remove --purge apache2-mpm-prefork apache2-common libapache2-mod-php5
apt-get install apache2-mpm-prefork libapache2-mod-php5
a2enmod php5
/etc/init.d/apache2 restart

monsterherz
24.02.06, 14:58
Du könntest die Installation erneut versuchen:
getan.. - wau perfekt ! php-Info wird angezeigt! :)

danke