Autor Beitrag
bonanza
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55



BeitragVerfasst: Mi 31.12.08 16:02 
Hi,

ich versuche per Idhttp.post ein paar anfragen an einen PHP-script zu senden, die Parameter und auch der Link sind sicher korrekt, allerdings kriege ich immer folgenden Fehler, anstatt der korrekten Website geliefert:
Zitat:

<b>Warning</b>: Cannot modify header information - headers already sent by (output started at abc.txt:60) in <b>/abc.php</b> on line <b>19</b><br />




nun habe ich mal das Script in Firefox geladen und mit dem plugin Liveheader den Antwort-header des scripts augelesen:
Zitat:


HTTP/1.1 200 OK
Date: Wed, 31 Dec 2008 00:45:40 GMT
Server: Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.4 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g
X-Powered-By: PHP/5.2.4-2ubuntu5.4
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 8601
Keep-Alive: timeout=15, max=998
Connection: Keep-Alive
Content-Type: text/html; charset=ISO-8859-1



Diese einstellungen habe, dann nachdem es vorher nie (und nachher auch nicht Wink ) funktioniert hat in den CustomHeader bereich der TidHTTP kopiert.
Allerdings ebenfalls ohne erfolg.

in den Parameter, die ich sende sind keine "komische Zeichen" enthalten, das einzige was vorkommt sind neben den Alphanumberischen Zeichen auch "=" und "_".


wäre für eure Hilfe sehr dankbar
danke schonmal im voraus
bonanza

P.s: Handleredirects is auch auf wahr :-/

Ich weiß auch, dass es ansich ein PHP fehler ist, aber da der firefox, das ja auch geregelt bekommt, müsste man das doch (so hoffe ich mal) auch bei Indy hinkriegen....

hier die aktuellen einstellungen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
object IdHTTP1: TIdHTTP
    AllowCookies = True
    HandleRedirects = True
    ProxyParams.BasicAuthentication = False
    ProxyParams.ProxyPort = 0
    Request.ContentLength = -1
    Request.Accept = 'text/html, */*'
    Request.BasicAuthentication = False
    Request.UserAgent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)'
    HTTPOptions = [hoForceEncodeParams]
    Left = 152
    Top = 24
  end
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Fr 02.01.09 00:15 
Moin!

user profile iconbonanza hat folgendes geschrieben Zum zitierten Posting springen:
Ich weiß auch, dass es ansich ein PHP fehler ist, aber da der firefox, das ja auch geregelt bekommt, müsste man das doch (so hoffe ich mal) auch bei Indy hinkriegen...
Du schreibst nix davon, dass der Firefox irgendwas "geregelt" kriegt oder Content liefert, da ist ja auch nur der Header von dir zitiert. :lupe:

Aus meiner Sicht produziert das PHP-Script den Fehler, du solltest also besser auf der PHP-seite suchen, statt bei der Delphi-Kompo. :nixweiss:

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 02.01.09 00:33 
Das ist EINDEUTIG ein PHP-Fehler und kein Fehler der Indys ... auch wenn die sonst immer wieder Schuld tragen ...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
bonanza Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55



BeitragVerfasst: Fr 02.01.09 18:20 
hi,

erstmal danke für eure Antworten....

ja, dass da was im PHP-script nicht stimmt, is mir klar... Allerdings sendet Firefox ja auch die gleichen Anweisungen wie ich an das Script und bekommt keine Header-fehler zurück, sondern die "korrekte" Serverantwort.

Daher dachte ich, dass man an der Indy-kompo vielleicht auch etwas so einstellen könnte, wie es beim firefox standard ist.


gruß
bonanza
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 02.01.09 19:08 
Dazu müsstest Du einmal das PHP-Skript anhängen, damit man das genauer betrachteen kann, da es unter gewissen Umständen bei Skriptfehlern zu sog. Response Splitting kommen kann.

Eine häufige Ursache für diesen Fehler kann übrigens der Include einer Datei mit Byte Order Mark am Anfang sein.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.