View previous topic :: View next topic |
Author |
Message |
JoHo42 l33t
Joined: 14 Feb 2004 Posts: 956 Location: Germany
|
Posted: Mon Feb 14, 2011 5:01 pm Post subject: bekomme apache mit php nicht ans laufen |
|
|
Hi Leute,
ich habe apache2 und php5 installiert.
Allerdings bekomme ich php5 nicht ans laufen.
Ich habe in der /etc/conf.d/apache2 die Zeile bearbeitet:
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5"
Allerdings geht es immer nocht nicht.
In einer Testwebseite habe ich
<?php
echo "bla";
?>
geschrieben allerdings ist dies nicht auf der Webseite sichtbar.
Gruss Joerg |
|
Back to top |
|
|
Hollowman Guru
Joined: 19 Apr 2007 Posts: 584
|
Posted: Mon Feb 14, 2011 5:37 pm Post subject: |
|
|
Hi
Was siehst du auf der Webseite?
Was steht im Apache Error Log?
Apache neu gestartet?
Was sagt eselect php list apache2?
Endet die Testwebseite auf .php?
Sebastian |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3925 Location: Hamburg
|
Posted: Mon Feb 14, 2011 6:09 pm Post subject: |
|
|
Und Dein php-script befindet sich auch in /var/www/localhost/cgi-bin ? |
|
Back to top |
|
|
JoHo42 l33t
Joined: 14 Feb 2004 Posts: 956 Location: Germany
|
Posted: Mon Feb 14, 2011 6:14 pm Post subject: |
|
|
Hi Hollowman,
ich sehe halt eine ganz normale HTML Seite.
Halt Hintergrundfarbe, ein java script und Text ist da drauf.
Mehr enthält die Seite nicht.
Und halt im body steht
<?php
echo "bla";
?>
Also hoffe ich das dieses bla irgendwo auf der Webseite auftaucht.
Die Datei heisst index.php und liegt im htdocs Verzeichnis.
-rw-r--r-- 1 apache apache 8712 Feb 14 13:17 index.php
Im error_log steht nix von php.
Ja die Datei endet auf index.php
Apache ist neu gestartet.
eselect sagt:
eselect php list
!!! Error: Please chose one of the following modules: cli apache2 fpm cgi
exiting
Wenn ich das so schreibe
eselect php list apache2
kommt diese Antwort:
[1] php5.3 *
Gruss Jörg |
|
Back to top |
|
|
lxg Veteran
Joined: 12 Nov 2005 Posts: 1019 Location: Aachen, Germany
|
Posted: Mon Feb 14, 2011 6:30 pm Post subject: |
|
|
Gibt es bei Dir unter /etc/apache2/modules.d/ eine .conf-Datei mit PHP im Namen, bspw. 70_mod_php5.conf? _________________ lxg.de – codebits and tech talk |
|
Back to top |
|
|
JoHo42 l33t
Joined: 14 Feb 2004 Posts: 956 Location: Germany
|
Posted: Mon Feb 14, 2011 6:34 pm Post subject: |
|
|
Ja die gibt es:
-rw-r--r-- 1 root root 348 Feb 14 05:24 /etc/apache2/modules.d/70_mod_php5.conf
Gruss Joerg |
|
Back to top |
|
|
JoHo42 l33t
Joined: 14 Feb 2004 Posts: 956 Location: Germany
|
Posted: Mon Feb 14, 2011 7:06 pm Post subject: |
|
|
HI toralf,
nein das befindet sich in htdocs.
Muss es denn dort liegen?
Wie spreche ich das den an?
Es soll doch eigentlich in einer normalen Webseite eingebaut werden.
Gruss Jörg |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3925 Location: Hamburg
|
Posted: Mon Feb 14, 2011 8:34 pm Post subject: |
|
|
JoHo42 wrote: | nein das befindet sich in htdocs.
Muss es denn dort liegen? | Nein, aber brings doch dorthin und schon weist Du, ob Apache prinzipiell PHP mag. Denn in dem Fall mußt Du nur noch Apache anweisen, Skripte auch aus einem Nicht-Standard-Pfad *auszuführen* anstelle diese als (Text-)Datei anzuzeigen.
Last edited by toralf on Mon Feb 14, 2011 9:06 pm; edited 1 time in total |
|
Back to top |
|
|
py-ro Veteran
Joined: 24 Sep 2002 Posts: 1734 Location: Velbert
|
Posted: Mon Feb 14, 2011 8:53 pm Post subject: |
|
|
Bei der Standard-Konfiguration ist es egal wo die liegt, aber mal ganz doof, apache mal neugestartet? |
|
Back to top |
|
|
JoHo42 l33t
Joined: 14 Feb 2004 Posts: 956 Location: Germany
|
Posted: Mon Feb 14, 2011 9:15 pm Post subject: |
|
|
Hi Leute,
danke für die vielen Antworten.
Es läuft auf einmal warum weiss ich auch nicht.
Gruss Jörg |
|
Back to top |
|
|
|