Autor Beitrag
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: So 18.07.04 17:38 
Also, ich verwende folgenden Code:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
    Daten := TIdMultiPartFormDataStream.Create;

    Daten.AddFormField('username', NickEdit.Text);
    Daten.AddFormField('password', PassEdit.Text);
    Daten.AddFormField('redirect', ' ');

    Client.Post('http://gta-place.s3.cybton.com/phpBB2/login.php', Daten);
    Daten.Free;


Und ein Script von PHP. Quelltext des Scriptes sieht so aus:

ausblenden volle Höhe Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css"></head><body bgcolor="#001831" text="#FFFFFF" link="#D6D6E7" vlink="#D3D3D5">

<link rel="top" href="./index.php" title="GTA-Place.de.vu Foren-Übersicht" />
<link rel="search" href="./search.php" title="Suchen" />
<link rel="help" href="./faq.php" title="FAQ" />
<link rel="author" href="./memberlist.php" title="Mitgliederliste" />

<title>GTA-Place.de.vu - Login</title>

<link rel="stylesheet" href="templates/andro/andro.css" type="text/css">




<a name="top"></a>

<table width="750" cellspacing="0" cellpadding="10" border="0" align="center">
  <tr>
    <td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">
      <tr>
        <td><a href="index.php"><img src="templates/andro/images/title.gif" border="0" alt="GTA-Place.de.vu Foren-Übersicht" vspace="1" />
                      </a></td></tr>
                        <tr>
        <td align="center" width="100%" valign="top">

        <table border=0 width=100% cellpadding=0 cellspacing=0>
        <tr>
        <td align="right" width="100%" valign="top">
                    <span class="mainmenu"><a href="faq.php" class="mainmenu">FAQ</a></span>
                    <BR>
                  <span class="mainmenu"><a href="memberlist.php" class="mainmenu">Mitgliederliste</a>
                  <BR>
                  <span class="mainmenu"><a href="profile.php?mode=editprofile" class="mainmenu">Profil</a>
                  <BR>
                  <a href="privmsg.php?folder=inbox" class="mainmenu">Einloggen, um private Nachrichten zu lesen</a>
                  <BR>
                  <a href="login.php" class="mainmenu">Login</a></span>
                  <br>
                  <a href="profile.php?mode=register"class="mainmenu">Registrieren</a></span>
                </td>
      </tr>
      </table>



</table></table>

<form action="login.php" method="post">

<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
  <tr>
  <td align="left" class="nav"><a href="index.php" class="nav">GTA-Place.de.vu Foren-Übersicht</a></td>
  </tr>
</table>

<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
  <tr>
  <th height="25" class="thHead" nowrap="nowrap">Gib bitte deinen Benutzernamen und dein Passwort ein, um dich einzuloggen!</th>
  </tr>
  <tr>
  <td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%">
      <tr>
      <td colspan="2" align="center"> </td>
      </tr>
      <tr>
      <td width="45%" align="right"><span class="gen">Benutzername:</span></td>
      <td>
        <input type="text" name="username" size="25" maxlength="40" value="" />
      </td>
      </tr>
      <tr>
      <td align="right"><span class="gen">Passwort:</span></td>
      <td>
        <input type="password" name="password" size="25" maxlength="25" />
      </td>
      </tr>
      <tr align="center">
      <td colspan="2"><span class="gen">Bei jedem Besuch automatisch einloggen: <input type="checkbox" name="autologin" /></span></td>
      </tr>
      <tr align="center">
      <td colspan="2"><input type="hidden" name="redirect" value="" /><input type="submit" name="login" class="mainoption" value="Login" /></td>
      </tr>
      <tr align="center">
      <td colspan="2"><span class="gensmall"><a href="profile.php?mode=sendpassword" class="gensmall">Ich habe mein Passwort vergessen!</a></span></td>
      </tr>
    </table></td>
  </tr>
</table>

</form>


<div align="center"><span class="copyright">
<!--
  We request you retain the full copyright notice below including the link to www.phpbb.com.
  This not only gives respect to the large amount of time given freely by the developers
  but also helps build interest, traffic and use of phpBB 2.0. If you cannot (for good
  reason) retain the full copyright we request you at least leave in place the
  Powered by phpBB 2.0.6 line, with phpBB linked to www.phpbb.com. If you refuse
  to include even this then support on our forums may be affected.

  The phpBB Group : 2002
// -->
Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> 2.0.6 © 2001 phpBB Group</span></div>
    </td>
  </tr>
</table>

</body>
</html>


Wenn ich jetzt aber die drei Variablen übergebe, hängt sich Delphi auf (ohne Fehlermeldung).

Es gibt drei Möglichkeiten:

1. Ich übergeb irgendeine Variable nicht
2. Mein Quelltext ist falsch
3. Mein Indy ist fehlerhaft (ist Version 9)
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 19.07.04 12:52 
hast du schonmal die eigenschaft readtimeout der indy http komponente verändert ?? wenn die noch auf 0 steht, heisst das, dass der Timeout nicht definert ist. probiers mal mit nem wert so um die 8000 - 15000.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
GTA-Place Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Mo 19.07.04 15:59 
Ja gut, aber ich würd gern trotzdem wissen warum es net geht.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 19.07.04 19:08 
es kann sein, dass sich da was in einer schleife aufhängt und indy ewig auf die ausführung wartet. hast dus schon mit dem timeout probiert ?

_________________
In the beginning was the word.
And the word was content-type: text/plain.
GTA-Place Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Di 20.07.04 05:51 
Jo, dann hört er nach der Timeout-Funktion auf und das wars.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Di 20.07.04 14:54 
brichtg er mit ner fehlermeldung ab oder was ?? beschreib mal was er genau macht, dann kann man dir auch besser helfen !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
GTA-Place Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Di 20.07.04 14:59 
Er macht absolut nix! Keine Fehlermeldung, kein "Ding", ne garnix!
Udontknow
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2596

Win7
D2006 WIN32, .NET (C#)
BeitragVerfasst: Di 20.07.04 15:11 
Irgendwie habe ich das Gefühl, dass du den Begriff "Aufhängen" falsch verwendest. Sieht man ein ShowMessage-Dialog denn, wenn man danach "ShowMessage('Test')" ausführt?

Cu,
Udontknow
GTA-Place Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Di 20.07.04 15:24 
Wenn ich nirgends klicken kann und das Fenster net verschieben kann, dann heißt das für mich:

MEIN PROGRAMM HAT SICH AUFGEHÄNGT!

Und wenn ich das mit dem Timeout mache, dann geht das alles.
GTA-Place Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Di 20.07.04 16:42 
Problem gelöst:

Zitat:
|17:30:35| <|CRC|GTA-Place|> hi
|17:30:55| <|CRC|GTA-Place|> helft mir bitte mal da:
|17:30:56| <|CRC|GTA-Place|> www.delphi-forum.de/topic_28167.html
|17:36:38| <tGS|SmK|wrk> hmm
|17:36:53| <tGS|SmK|wrk> ka obs dir hilft, zumal ich den php/html quatsch da net verstehe
|17:36:56| <tGS|SmK|wrk> aber
|17:37:20| <tGS|SmK|wrk> bei unseren php scripten ist es manchmal aufgetreten, dass die letzte variable net übertragen wurde
|17:38:05| <tGS|SmK|wrk> deshalb haben wir immer noch ne dummievariable als letztes ins multiblablastream gehängt, die nicht im php genutzt wurde
|17:38:14| <tGS|SmK|wrk> dann ist dieser effekt auch nimmer aufgetreten
|17:38:47| <|CRC|GTA-Place|> thx
|17:38:50| <|CRC|GTA-Place|> ich teste es mal
|17:40:09| <|CRC|GTA-Place|> mh... er hängt mal nicht mehr
GTA-Place Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Di 20.07.04 17:11 
*mist*e! Als Antwort vom Server, bekomm ich den Quelltext des PHP-Scriptes.
So find ich aber nicht heraus, ob das Passwort oder so stimmt.
Weiß da einer ne Lösung?
Udontknow
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2596

Win7
D2006 WIN32, .NET (C#)
BeitragVerfasst: Mi 21.07.04 08:16 
??? Den PHP-Quelltext? :shock:
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Mi 21.07.04 09:48 
Ich hatte es ja schon in der Shoutbox erwähnt: Wenn dir der Server den Quellcode der PHP Skripte zurückgibt, dann liegt das nicht an den Indy, da er ja auf alle Anfragen gleich antwortet. Wenn er dir wirklich das Skript zurückgibt, im Browser aber auf dem gleichen Server alles funktioniert. Dann hast du ein Supertool geschrieben, um anderen ihren PHP-Source zu klauen.
Damit erübrigt sich die Frage nach Veröffentlichung des Source des neuen Forums :mrgreen:

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.