ubuntuusers.de

Module php5 does not exist!: Stattdessen Download der PHP Datei

Status: Ungelöst | Ubuntu-Version: Ubuntu 10.04 (Lucid Lynx)
Antworten |

taifunorkan

Anmeldungsdatum:
9. Februar 2009

Beiträge: 33

Hallo Leute,

ich drehe mich immer wieder im Kreis und hatte die Lösung zwischenzeitlich schon aufgegeben. Doch nun brauche ich doch einen lokalen Webserver, weil ich ein Forum auf Platte installieren und durchsuchen will.

Also ich habe sowohl Apache als auch php5 installiert und kann die index.html über localhost aufrufen und die Nachricht "Herzlich Willkommen" lesen. Auch libapache2-mod-php5 ist installiert.

Gebe ich nach dem Prompt ein "sudo a2enmod php5" ein erhalte ich die Fehlermeldung: "Module php5 does not exist!" Beim Aufruf der phpinfo.php im Browser wird diese zum Download angeboten und nicht aufgeführt.

So ein Scheiß!!!!! Mann ist das alles kompliziert. Ich glaube, ich brauch da ein Bisschen Nachhilfe.

Liebe Grüße, Bernd

Ryuno-Ki

Avatar von Ryuno-Ki

Anmeldungsdatum:
7. März 2011

Beiträge: 1105

Wohnort: Stuttgart

Ich versteh nichts von Servern, aber les mir so einige Meldungen durch ...

So du nicht selber versiert sein solltest (schätze, dann würdest du mehr Infos angeben können), wirst du dich mit einer VirtualBox-Lernsession anfreunden dürfen ("Server sind keine Kinderspielplätze").

Nicht, dass du dich hinterher aufregst. Soll nur schon einmal eine mentale Vorbereitung darstellen.

Mit freundlichem Gruß, Ryu

taifunorkan

(Themenstarter)

Anmeldungsdatum:
9. Februar 2009

Beiträge: 33

Ich versteh nichts von Servern

Hallo Ryuno-Ki,

danke für die Antwort. Ich finde, dass ich einige Informationen gegeben habe, die wichtig sind. Natürlich bin ich nicht so versiert, da ich eigentlich von Ubuntu erwartet hätte, dass es mit einem vorinstallierten Webserver und PHP daherkommt wie das mal der Fall gewesen sein soll. Wenn ich dann das ganze über die Synaptic installiere, so wie ich das in Tutorials vorfinde, dann darf ich mich schon freuen, wenn ich dann von dir als Blödmann bezeichnet werde. Meine kleine Tochter sagt immer: Was man sagt, das ist man selbst. Das war's zum Thema Sandbox.

Gleichzeitig würde ich mich sehr darüber freuen, wenn mir doch jemand helfen könnte, ohne mich gleich abzuqualifizieren. Die Ubuntu-Gemeinde ist wie ich selber sehr hilfsbereit.

Bernd

Ryuno-Ki

Avatar von Ryuno-Ki

Anmeldungsdatum:
7. März 2011

Beiträge: 1105

Wohnort: Stuttgart

taifunorkan schrieb: Wenn ich dann das ganze über die Synaptic installiere, so wie ich das in Tutorials vorfinde, dann darf ich mich schon freuen, wenn ich dann von dir als Blödmann bezeichnet werde.

Ich dachte eher an die Beiträge hier: http://ubuntuusers.de/search/?query=server%20spielzeug&area=forum

Darfst dich gerne einmal ein wenig umsehen, wie andere User bei Server-Einstiegsfragen abgehandelt wurden.

Ich wollte dich halt nur vorwarnen.

So, genug OffTopic.

Ich halt mich raus.

encbladexp Team-Icon

Ehemaliger
Avatar von encbladexp

Anmeldungsdatum:
16. Februar 2007

Beiträge: 17521

Einen Neustart vom Apache hast du schon mal gemacht? Der läd Module nämlich nicht im laufenden Betrieb. Liste doch bitte mal die Module welche Verfügbar und Installiert sind auf:

ls -l -h /etc/apache2/mods-available/
ls -l -h /etc/apache2/mods-enabled/

mfg Betz Stefan

TheDarkRose

Avatar von TheDarkRose

Anmeldungsdatum:
28. Juli 2010

Beiträge: 3459

Ryuno-Ki schrieb:

taifunorkan schrieb: Wenn ich dann das ganze über die Synaptic installiere, so wie ich das in Tutorials vorfinde, dann darf ich mich schon freuen, wenn ich dann von dir als Blödmann bezeichnet werde.

Ich dachte eher an die Beiträge hier: http://ubuntuusers.de/search/?query=server%20spielzeug&area=forum

Darfst dich gerne einmal ein wenig umsehen, wie andere User bei Server-Einstiegsfragen abgehandelt wurden.

Ich wollte dich halt nur vorwarnen.

So, genug OffTopic.

Ich halt mich raus.

Dann solltest du aber mal den kompletten Text des Threaderstellers lesen. Denn dieser versucht gerade lokal einen Webserver zu installieren. DA gibt es immer Unterstützung von uns, wenn man so zum lernen anfängt.

xabbuh Team-Icon

Anmeldungsdatum:
25. Mai 2006

Beiträge: 6411

Zeige bitte auch mal die Ausgabe von aptitude search libapache2-mod-php5.

taifunorkan

(Themenstarter)

Anmeldungsdatum:
9. Februar 2009

Beiträge: 33

@encbladexp Hallo Stefan!

Apache habe ich bei jedem Versuch neu gestartet: sudo /etc/init.d/apache2 restart

Gebe ich dann aber folgende Adresse in den Browser ein: localhost/phpinfo.php so wird die Datei nicht ausgeführt, sondern gespeichert. Hier ist die Liste mit den Modulen.

ls -l -h /etc/apache2/mods-available/

~$ ls -l -h /etc/apache2/mods-available/
insgesamt 356K
-rw-r--r-- 1 root root  332 2010-04-13 22:20 actions.conf
-rw-r--r-- 1 root root   66 2010-04-13 22:20 actions.load
-rw-r--r-- 1 root root  815 2010-04-13 22:20 alias.conf
-rw-r--r-- 1 root root   62 2010-04-13 22:20 alias.load
-rw-r--r-- 1 root root   60 2010-04-13 22:20 asis.load
-rw-r--r-- 1 root root   72 2010-04-13 22:20 auth_basic.load
-rw-r--r-- 1 root root   74 2010-04-13 22:20 auth_digest.load
-rw-r--r-- 1 root root   74 2010-04-13 22:20 authn_alias.load
-rw-r--r-- 1 root root   72 2010-04-13 22:20 authn_anon.load
-rw-r--r-- 1 root root   85 2010-04-13 22:20 authn_dbd.load
-rw-r--r-- 1 root root   70 2010-04-13 22:20 authn_dbm.load
-rw-r--r-- 1 root root   78 2010-04-13 22:20 authn_default.load
-rw-r--r-- 1 root root   72 2010-04-13 22:20 authn_file.load
-rw-r--r-- 1 root root   90 2010-04-13 22:20 authnz_ldap.load
-rw-r--r-- 1 root root   70 2010-04-13 22:20 authz_dbm.load
-rw-r--r-- 1 root root   78 2010-04-13 22:20 authz_default.load
-rw-r--r-- 1 root root   82 2010-04-13 22:20 authz_groupfile.load
-rw-r--r-- 1 root root   72 2010-04-13 22:20 authz_host.load
-rw-r--r-- 1 root root   74 2010-04-13 22:20 authz_owner.load
-rw-r--r-- 1 root root   72 2010-04-13 22:20 authz_user.load
-rw-r--r-- 1 root root 3,2K 2010-04-13 22:20 autoindex.conf
-rw-r--r-- 1 root root   70 2010-04-13 22:20 autoindex.load
-rw-r--r-- 1 root root   62 2010-04-13 22:20 cache.load
-rw-r--r-- 1 root root   70 2010-04-13 22:20 cern_meta.load
-rw-r--r-- 1 root root   68 2010-04-13 22:20 cgid.conf
-rw-r--r-- 1 root root   60 2010-04-13 22:20 cgid.load
-rw-r--r-- 1 root root   58 2010-04-13 22:20 cgi.load
-rw-r--r-- 1 root root   76 2010-04-13 22:20 charset_lite.load
-rw-r--r-- 1 root root   36 2010-04-13 22:20 dav_fs.conf
-rw-r--r-- 1 root root   79 2010-04-13 22:20 dav_fs.load
-rw-r--r-- 1 root root   58 2010-04-13 22:20 dav.load
-rw-r--r-- 1 root root   68 2010-04-13 22:20 dav_lock.load
-rw-r--r-- 1 root root   58 2010-04-13 22:20 dbd.load
-rw-r--r-- 1 root root  438 2010-04-13 22:20 deflate.conf
-rw-r--r-- 1 root root   66 2010-04-13 22:20 deflate.load
-rw-r--r-- 1 root root  122 2010-04-13 22:20 dir.conf
-rw-r--r-- 1 root root   58 2010-04-13 22:20 dir.load
-rw-r--r-- 1 root root  604 2010-04-13 22:20 disk_cache.conf
-rw-r--r-- 1 root root   89 2010-04-13 22:20 disk_cache.load
-rw-r--r-- 1 root root   64 2010-04-13 22:20 dump_io.load
-rw-r--r-- 1 root root   58 2010-04-13 22:20 env.load
-rw-r--r-- 1 root root   66 2010-04-13 22:20 expires.load
-rw-r--r-- 1 root root   72 2010-04-13 22:20 ext_filter.load
-rw-r--r-- 1 root root   89 2010-04-13 22:20 file_cache.load
-rw-r--r-- 1 root root   64 2010-04-13 22:20 filter.load
-rw-r--r-- 1 root root   66 2010-04-13 22:20 headers.load
-rw-r--r-- 1 root root   62 2010-04-13 22:20 ident.load
-rw-r--r-- 1 root root   68 2010-04-13 22:20 imagemap.load
-rw-r--r-- 1 root root   66 2010-04-13 22:20 include.load
-rw-r--r-- 1 root root  420 2010-04-13 22:20 info.conf
-rw-r--r-- 1 root root   60 2010-04-13 22:20 info.load
-rw-r--r-- 1 root root   60 2010-04-13 22:20 ldap.load
-rw-r--r-- 1 root root   76 2010-04-13 22:20 log_forensic.load
-rw-r--r-- 1 root root  185 2010-04-13 22:20 mem_cache.conf
-rw-r--r-- 1 root root   87 2010-04-13 22:20 mem_cache.load
-rw-r--r-- 1 root root 6,3K 2010-04-13 22:20 mime.conf
-rw-r--r-- 1 root root   60 2010-04-13 22:20 mime.load
-rw-r--r-- 1 root root   81 2010-04-13 22:20 mime_magic.conf
-rw-r--r-- 1 root root   72 2010-04-13 22:20 mime_magic.load
-rw-r--r-- 1 root root  666 2010-04-13 22:20 negotiation.conf
-rw-r--r-- 1 root root   74 2010-04-13 22:20 negotiation.load
-rw-r--r-- 1 root root  618 2010-12-09 14:11 php5.conf
-rw-r--r-- 1 root root   87 2010-04-13 22:20 proxy_ajp.load
-rw-r--r-- 1 root root   97 2010-04-13 22:20 proxy_balancer.load
-rw-r--r-- 1 root root  589 2010-04-13 22:20 proxy.conf
-rw-r--r-- 1 root root   95 2010-04-13 22:20 proxy_connect.load
-rw-r--r-- 1 root root   87 2010-04-13 22:20 proxy_ftp.load
-rw-r--r-- 1 root root   89 2010-04-13 22:20 proxy_http.load
-rw-r--r-- 1 root root   62 2010-04-13 22:20 proxy.load
-rw-r--r-- 1 root root   89 2010-04-13 22:20 proxy_scgi.load
-rw-r--r-- 1 root root  429 2010-04-13 22:20 reqtimeout.conf
-rw-r--r-- 1 root root   72 2010-04-13 22:20 reqtimeout.load
-rw-r--r-- 1 root root   66 2010-04-13 22:20 rewrite.load
-rw-r--r-- 1 root root 1,2K 2010-04-13 22:20 setenvif.conf
-rw-r--r-- 1 root root   68 2010-04-13 22:20 setenvif.load
-rw-r--r-- 1 root root   66 2010-04-13 22:20 speling.load
-rw-r--r-- 1 root root 2,4K 2010-04-13 22:20 ssl.conf
-rw-r--r-- 1 root root   58 2010-04-13 22:20 ssl.load
-rw-r--r-- 1 root root  398 2010-04-13 22:20 status.conf
-rw-r--r-- 1 root root   64 2010-04-13 22:20 status.load
-rw-r--r-- 1 root root   72 2010-04-13 22:20 substitute.load
-rw-r--r-- 1 root root   64 2010-04-13 22:20 suexec.load
-rw-r--r-- 1 root root   70 2010-04-13 22:20 unique_id.load
-rw-r--r-- 1 root root  604 2010-04-13 22:20 userdir.conf
-rw-r--r-- 1 root root   66 2010-04-13 22:20 userdir.load
-rw-r--r-- 1 root root   70 2010-04-13 22:20 usertrack.load
-rw-r--r-- 1 root root   66 2010-04-13 22:20 version.load
-rw-r--r-- 1 root root   74 2010-04-13 22:20 vhost_alias.load

ls -l -h /etc/apache2/mods-enabled/

~$ ls -l -h /etc/apache2/mods-enabled/
insgesamt 8,0K
lrwxrwxrwx 1 root root  28 2010-06-22 22:21 alias.conf -> ../mods-available/alias.conf
lrwxrwxrwx 1 root root  28 2010-06-22 22:21 alias.load -> ../mods-available/alias.load
lrwxrwxrwx 1 root root  33 2010-06-22 22:21 auth_basic.load -> ../mods-available/auth_basic.load
lrwxrwxrwx 1 root root  33 2010-06-22 22:21 authn_file.load -> ../mods-available/authn_file.load
lrwxrwxrwx 1 root root  36 2010-06-22 22:21 authz_default.load -> ../mods-available/authz_default.load
lrwxrwxrwx 1 root root  38 2010-06-22 22:21 authz_groupfile.load -> ../mods-available/authz_groupfile.load
lrwxrwxrwx 1 root root  33 2010-06-22 22:21 authz_host.load -> ../mods-available/authz_host.load
lrwxrwxrwx 1 root root  33 2010-06-22 22:21 authz_user.load -> ../mods-available/authz_user.load
lrwxrwxrwx 1 root root  32 2010-06-22 22:21 autoindex.conf -> ../mods-available/autoindex.conf
lrwxrwxrwx 1 root root  32 2010-06-22 22:21 autoindex.load -> ../mods-available/autoindex.load
lrwxrwxrwx 1 root root  26 2010-12-09 09:08 cgi.load -> ../mods-available/cgi.load
lrwxrwxrwx 1 root root  30 2010-06-22 22:21 deflate.conf -> ../mods-available/deflate.conf
lrwxrwxrwx 1 root root  30 2010-06-22 22:21 deflate.load -> ../mods-available/deflate.load
lrwxrwxrwx 1 root root  26 2010-06-22 22:21 dir.conf -> ../mods-available/dir.conf
lrwxrwxrwx 1 root root  26 2010-06-22 22:21 dir.load -> ../mods-available/dir.load
lrwxrwxrwx 1 root root  26 2010-06-22 22:21 env.load -> ../mods-available/env.load
lrwxrwxrwx 1 root root  27 2010-06-22 22:21 mime.conf -> ../mods-available/mime.conf
lrwxrwxrwx 1 root root  27 2010-06-22 22:21 mime.load -> ../mods-available/mime.load
lrwxrwxrwx 1 root root  34 2010-06-22 22:21 negotiation.conf -> ../mods-available/negotiation.conf
lrwxrwxrwx 1 root root  34 2010-06-22 22:21 negotiation.load -> ../mods-available/negotiation.load
-rw-r--r-- 1 root root 546 2010-09-17 16:03 php5.conf
-rw-r--r-- 1 root root  59 2010-09-17 16:03 php5.load
lrwxrwxrwx 1 root root  33 2010-06-22 22:21 reqtimeout.conf -> ../mods-available/reqtimeout.conf
lrwxrwxrwx 1 root root  33 2010-06-22 22:21 reqtimeout.load -> ../mods-available/reqtimeout.load
lrwxrwxrwx 1 root root  31 2010-06-22 22:21 setenvif.conf -> ../mods-available/setenvif.conf
lrwxrwxrwx 1 root root  31 2010-06-22 22:21 setenvif.load -> ../mods-available/setenvif.load
lrwxrwxrwx 1 root root  29 2010-06-22 22:21 status.conf -> ../mods-available/status.conf
lrwxrwxrwx 1 root root  29 2010-06-22 22:21 status.load -> ../mods-available/status.load
lrwxrwxrwx 1 root root  30 2010-12-08 05:14 userdir.conf -> ../mods-available/userdir.conf
lrwxrwxrwx 1 root root  30 2010-12-08 05:14 userdir.load -> ../mods-available/userdir.load

@xabbuh Danke auch dir für deine Hilfe

~$ aptitude search libapache2-mod-php5
i A libapache2-mod-php5             - server-side, HTML-embedded scripting langu
p   libapache2-mod-php5filter       - server-side, HTML-embedded scripting langu

@TheDarkRose Vielen Dank! @Ryuno-Ki: Ist schon okay.

Bernd

encbladexp Team-Icon

Ehemaliger
Avatar von encbladexp

Anmeldungsdatum:
16. Februar 2007

Beiträge: 17521

taifunorkan schrieb:

~$ ls -l -h /etc/apache2/mods-enabled/
-rw-r--r-- 1 root root 546 2010-09-17 16:03 php5.conf
-rw-r--r-- 1 root root  59 2010-09-17 16:03 php5.load

Dateien in der mods-enabled sind normalerweise _alle_ symbolische Links. Bei dir sind die php5 Teile aber normale Dateien. Was steht in den oben gelisteten Dateien drin?

Das richtige Apache Modul ist installiert, nur wundere ich mich etwas warum da kein Symlink vorhanden ist. Mach mal bitte folgendes:

apt-get purge libapache2-mod-php5

Dann müssen in mods-enabled und mods-avaliable die Dateien mit php* weg sein! Wenn nicht kannst du diese löschen. Dann einfach das Paket libapache2-mod-php5 neu installieren. Mit a2enmod müsstest du das Modul dann aktivieren können (a2enmod php5).

mfg Betz Stefan

taifunorkan

(Themenstarter)

Anmeldungsdatum:
9. Februar 2009

Beiträge: 33

Hallo Stefan und Grüße auch an alle, die mithelfen wollen!

Also in php5.conf steht:

<IfModule mod_php5.c>
    <FilesMatch "\.ph(p3?|tml)$">
	SetHandler application/x-httpd-php
    </FilesMatch>
    <FilesMatch "\.phps$">
	SetHandler application/x-httpd-php-source
    </FilesMatch>
    # To re-enable php in user directories comment the following lines
    # (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
    # prevents .htaccess files from disabling it.
    <IfModule mod_userdir.c>
        <Directory /home/*/public_html>
            php_admin_value engine Off
        </Directory>
    </IfModule>
</IfModule>

Und in php5.load ist folgendes drin:

LoadModule php5_module /usr/lib/apache2/modules/libphp5.so

Ich habe die beiden Dateien mal umbenannt in php5*bck.*, weil ich sie nicht gleich löschen wollte.

Mit a2enmod müsstest du das Modul dann aktivieren können (a2enmod php5)

Habe ich gemacht:

Module php5 already enabled

Ich starte mal den apache neu mit sudo /etc/init.d/apache2 restart Alles scheint okay!

Allerdings wird die PHP-Datei weiterhin zum Download angeboten. Auch im Verzeichnis mods-enabled stehen wieder beide Dateien drin, nämlich: php5.conf und php5.load

Alles sieht wieder aus wie gehabt. Und die php-Dateien werden nicht ausgeführt.

Trotzdem mal ein riesiges Danke!

Bernd

encbladexp Team-Icon

Ehemaliger
Avatar von encbladexp

Anmeldungsdatum:
16. Februar 2007

Beiträge: 17521

Wurde sonst noch was an den Konfigurationsdateien verändert? Mir kommt das etwas komisch vor, den "eigentlich" läuft nach der Installation vom PHP Paket und dem reload/restart des Apache alles wie es soll.

Die Dateien heisen ja auch ".php" am Ende vom Dateinamen?

mfg Betz Stefan

taifunorkan

(Themenstarter)

Anmeldungsdatum:
9. Februar 2009

Beiträge: 33

Hallo Stefan!

http://localhost/phpinfo.php

und in der Datei steht natürlich: <?php phpinfo();?>

Ich kann ja probieren, das ganze nochmal zu machen, was du vorgeschlagen hast. Aber viel Hoffnung hab ich nicht mehr.

Wurde sonst noch was an den Konfigurationsdateien verändert?

php5.conf

<IfModule mod_php5.c>
    <FilesMatch "\.ph(p3?|tml)$">
	SetHandler application/x-httpd-php
    </FilesMatch>
    <FilesMatch "\.phps$">
	SetHandler application/x-httpd-php-source
    </FilesMatch>
    # To re-enable php in user directories comment the following lines
    # (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
    # prevents .htaccess files from disabling it.
    <IfModule mod_userdir.c>
        <Directory /home/*/public_html>
            php_admin_value engine Off
        </Directory>
    </IfModule>
</IfModule>

php5.load

LoadModule php5_module /usr/lib/apache2/modules/libphp5.so

Es hat sich da nichts geändert.

Viele Grüße, Bernd

encbladexp Team-Icon

Ehemaliger
Avatar von encbladexp

Anmeldungsdatum:
16. Februar 2007

Beiträge: 17521

Nein, ich meine ob du noch irgendwo was geändert hast was nicht schon bei der Installation der Pakete so war?

mfg Betz Stefan

taifunorkan

(Themenstarter)

Anmeldungsdatum:
9. Februar 2009

Beiträge: 33

Leider bin ich mit dem Problem, dass mir eine php-Datei, die ich unter public-html abgelegt habe nicht ausgeführt sondern heruntergeladen wird, keinen Schritt weitergekommen.

Mittlerweile ist das Problem so akut, dass ich mir Sorgen mache, schließlich habe ich den Auftrag bekommen, den Internetauftritt einer Schule zu gestalten. Ich muss das erst lokal und offline durchspielen.

Ich habe mir das Error-Lpg des Webservers angesehen und festgestellt, dass da eine Menge Fehlermeldungen hinsichtlich php vorhanden sind. Vielleicht wäre jemand so nett, mir ein Bisschen zu helfen?

Ich benutze Ubuntu 10.04, php5 und apache2. Error Log siehe Anhang.

Bernd

error-log.txt (32.0 KiB)
Error Log File Apache 2 Server
Download error-log.txt

TheDarkRose

Avatar von TheDarkRose

Anmeldungsdatum:
28. Juli 2010

Beiträge: 3459

Laut log fehlen dir die Module für mcrypt, mysql(i) und pdo_mysql. solltest du aus der Paketverwaltung nachinstallieren.

Antworten |