Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
OT: PHP auf der Kommandozeile ohne Headerausgabe
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) Diskussionsforum
View previous topic :: View next topic  
Author Message
cosmophobia
Tux's lil' helper
Tux's lil' helper


Joined: 08 Jan 2007
Posts: 136

PostPosted: Fri Mar 28, 2008 8:45 am    Post subject: OT: PHP auf der Kommandozeile ohne Headerausgabe Reply with quote

Hallo..

veilleicht hat ja grad wer n tipp für mich.. wenn ich ein php-script auf der kommandozeile ausgebe und mit >> die ausgabe in eine datei leite habe ich am anfang der datei immer die störenden header.. "Content-type: text/html"
gibts eine commandozeile option um das zu umgehen..!?

das "x-powered by" hab ich schon mit "-d expose_php=Off" wegbekommen.. aber zu "content-type" hab ich noch nix gefunden..
_________________
Sinnlos oder Schlüssel zum Sinn des Seins..!? www.ultimate-mindmap.de
Mein Blog
Back to top
View user's profile Send private message
b3cks
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1481
Location: Bremen (GER)

PostPosted: Fri Mar 28, 2008 9:24 am    Post subject: Reply with quote

Wie rufst du das Script denn auf? Normal sollte über eine Konsole die CLI-Version (/usr/bin/php) von PHP genommen werden und dabei werden keine Header ausgegeben, lediglich bei der CGI-Version (/usr/bin/php-cgi).
_________________
I am /root and if you see me laughing you better have a backup.
Back to top
View user's profile Send private message
cosmophobia
Tux's lil' helper
Tux's lil' helper


Joined: 08 Jan 2007
Posts: 136

PostPosted: Fri Mar 28, 2008 10:15 am    Post subject: Reply with quote

Code:
/usr/bin/php -d expose_php=Off "pfad_zum_script" >> "pfad_zur_ausgabedatei"

_________________
Sinnlos oder Schlüssel zum Sinn des Seins..!? www.ultimate-mindmap.de
Mein Blog
Back to top
View user's profile Send private message
b3cks
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1481
Location: Bremen (GER)

PostPosted: Fri Mar 28, 2008 11:15 am    Post subject: Reply with quote

Hast du denn PHP überhaupt mit dem "cli" Use-Flag emerged? Sonst hast du nämlich auch keine CLI-Version. Und afaik kannst du die Aus-/Angabe des Headers in der CGI-Version nicht unterbinden. Macht ja auch keinen Sinn.

Code:
ba@alice ~/dev $ cat foobar.php
<?php
        echo "Hello World!\n";
?>
ba@alice ~/dev $ php foobar.php
Hello World!
ba@alice ~/dev $ php-cgi foobar.php
Content-type: text/html

Hello World!

_________________
I am /root and if you see me laughing you better have a backup.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum 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