Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PHP - Kein Ausgabe im Browser (apache, lighttpd)
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
doedel
Guru
Guru


Joined: 05 Feb 2006
Posts: 579
Location: Denmark

PostPosted: Sat May 25, 2013 6:24 pm    Post subject: PHP - Kein Ausgabe im Browser (apache, lighttpd) Reply with quote

Hi Leute,


ich hab ein kleines Problem, PHP zum Laufen zu bekommen. Ich hab damit seit Jahren nichts mehr am Hut gehabt und seh deshalb wahrscheinlich nicht worans liegt, etwas grossartiges wird das wohl kaum sein....


Ich habe lighttpd, apache und php compiliert. Beide Webserver starten auch ordentlich. Wenn ich in der config php ausmache, dann bekomme ich den Inhalt der PHP-Datei angezeigt. Wenn ich es anmache, bekomme ich einfach nur eine leere, weisse Seite angezeigt.

Die USE-Flags für PHP: "apache2 berkdb bzip2 cgi cli crypt ctype curl doc exif fileinfo filter gd gdbm gmp hash iconv ipv6 json mysql nls phar posix readline session simplexml ssl tokenizer truetype unicode xml xpm zip zlib"

USE-Flags lighttpd: "bzip2 doc gdbm ipv6 mysql pcre php ssl zlib"

USE-Flags apache: "doc ssl"
APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias"
APACHE2_MPMS=""


Die PHP-Datei ist entweder:
<? phpinfo(); ?>

oder ein echo Hello World, funktioniert beides nicht.

Ich hoffe könnt mir da auf die Schnelle weiterhelfen.
_________________
1 ha == 1 Hekto-Ar == 1 Hektar
Back to top
View user's profile Send private message
doedel
Guru
Guru


Joined: 05 Feb 2006
Posts: 579
Location: Denmark

PostPosted: Sat May 25, 2013 7:16 pm    Post subject: Reply with quote

Das ist ja schon fast mehr als peinlich...

Ein Copy&Paste Hello-World ging - es lag an <? statt <?php am Anfang der Datei.
_________________
1 ha == 1 Hekto-Ar == 1 Hektar
Back to top
View user's profile Send private message
Finswimmer
Bodhisattva
Bodhisattva


Joined: 02 Sep 2004
Posts: 5467
Location: Langen (Hessen), Germany

PostPosted: Sun May 26, 2013 12:08 pm    Post subject: Reply with quote

Das kann man auch bei PHP einstellen, dass das akzeptiert wird.
Ist standardmäßig aber deaktiviert:
php.ini wrote:

; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized.
short_open_tag = On

_________________
Bitte auf Rechtschreibung, korrekte Formatierung und Höflichkeit achten!
Danke
Back to top
View user's profile Send private message
doedel
Guru
Guru


Joined: 05 Feb 2006
Posts: 579
Location: Denmark

PostPosted: Sun May 26, 2013 4:58 pm    Post subject: Reply with quote

Oh, danke für den Tipp :) Ich hab das gleich mal geändert.
_________________
1 ha == 1 Hekto-Ar == 1 Hektar
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3333
Location: de

PostPosted: Mon May 27, 2013 1:00 pm    Post subject: Reply with quote

doedel wrote:
Oh, danke für den Tipp :) Ich hab das gleich mal geändert.

Besser wäre es gewesen, du hättest die PHP-Scripte geändert. "<?" war schon vor 10 Jahren ein schlechter Stil.
Back to top
View user's profile Send private message
doedel
Guru
Guru


Joined: 05 Feb 2006
Posts: 579
Location: Denmark

PostPosted: Mon May 27, 2013 4:11 pm    Post subject: Reply with quote

Das hab ich ja zuerst, geändert hab ich die config, erst als ich den Tip hier bekam ;)
_________________
1 ha == 1 Hekto-Ar == 1 Hektar
Back to top
View user's profile Send private message
tazinblack
Veteran
Veteran


Joined: 23 Jan 2005
Posts: 1146
Location: Baden / Germany

PostPosted: Wed May 29, 2013 5:09 am    Post subject: Re: PHP - Kein Ausgabe im Browser (apache, lighttpd) Reply with quote

doedel wrote:

Ich habe lighttpd, apache und php compiliert. Beide Webserver starten auch ordentlich.


Wieso denn zwei Webserver? Ich versuch immer mich auf einen zu beschränken.
Sorry, nur der Neugierde wegen.
_________________
Gruß / Regards
tazinblack
_______________________________________________________
what's the point in being grown up if you can't be childish sometimes
Back to top
View user's profile Send private message
doedel
Guru
Guru


Joined: 05 Feb 2006
Posts: 579
Location: Denmark

PostPosted: Wed May 29, 2013 5:53 am    Post subject: Reply with quote

Zum Testen, weils mit dem lighttpd nicht ging hab ich den apache compiliert.
_________________
1 ha == 1 Hekto-Ar == 1 Hektar
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum