CGI

Für Fragen zur Programmiersprache auf welcher Lazarus aufbaut
Christian
Beiträge: 6079
Registriert: Do 21. Sep 2006, 07:51
OS, Lazarus, FPC: iWinux (L 1.x.xy FPC 2.y.z)
CPU-Target: AVR,ARM,x86(-64)
Wohnort: Dessau
Kontaktdaten:

Beitrag von Christian »

Wie wärs,wenn ihr einfach mal auf der mailingliste nachfragt oder den code anschaut vorm weiterspekulieren.
Der Stream fehler ist sicher nen Eintrag im bugtracker wert.
W.m.k.A.h.e.m.F.h. -> http://www.gidf.de/

mschnell
Beiträge: 3444
Registriert: Mo 11. Sep 2006, 10:24
OS, Lazarus, FPC: svn (Window32, Linux x64, Linux ARM (QNAP) (cross+nativ)
CPU-Target: X32 / X64 / ARMv5
Wohnort: Krefeld

Beitrag von mschnell »

theo hat geschrieben:Das ist schon klar. Wird wohl im Ereignis OnCGIRequest des Datamodule passieren.

Ah, dass das Datamodul ein OnCGIRequest hat ist mnir nicht aufgefallen. Wo kommt das denn her ? Wier dämlich von mir !

theo hat geschrieben:Nur kriege ich eine Fehlermeldung beim Compilieren:
"Kann CGIDatamodule1 nicht streamen ... Access violation"


Bekomme ich in Windows auch. In Linux kann ich es übersetzen. Probiere ich heute abend.

-Michael

mschnell
Beiträge: 3444
Registriert: Mo 11. Sep 2006, 10:24
OS, Lazarus, FPC: svn (Window32, Linux x64, Linux ARM (QNAP) (cross+nativ)
CPU-Target: X32 / X64 / ARMv5
Wohnort: Krefeld

Beitrag von mschnell »

Vielleicht sollten die callbacks doch schon in TCGIDatamodule.OnCreate und nicht erst in TCGIDatamodule.OnCGIRequest definiert werden.

Nützt aber alles nix, ich bekomme eine Exception bevor er in TCGIDatamodule.OnCreate ankommt.

-Michael

mschnell
Beiträge: 3444
Registriert: Mo 11. Sep 2006, 10:24
OS, Lazarus, FPC: svn (Window32, Linux x64, Linux ARM (QNAP) (cross+nativ)
CPU-Target: X32 / X64 / ARMv5
Wohnort: Krefeld

Beitrag von mschnell »

theo hat geschrieben:Ich glaub das funzt einfach nicht ;-)
-> Bugtracker


Nach einigen weiteren Versuchen gebe ich Dir Recht.

Ich habe jetzt mehrere Bugs identifiziert.

Wo ist der Käferschlepper ? (Anglizismen wie "Bugtracker" sollte man im deutschen Forum vermeiden :lol: .)

-Michael

monta
Lazarusforum e. V.
Beiträge: 2809
Registriert: Sa 9. Sep 2006, 18:05
OS, Lazarus, FPC: Linux (L trunk FPC trunk)
CPU-Target: 64Bit
Wohnort: Dresden
Kontaktdaten:

Beitrag von monta »

Johannes

mschnell
Beiträge: 3444
Registriert: Mo 11. Sep 2006, 10:24
OS, Lazarus, FPC: svn (Window32, Linux x64, Linux ARM (QNAP) (cross+nativ)
CPU-Target: X32 / X64 / ARMv5
Wohnort: Krefeld

Beitrag von mschnell »

monta hat geschrieben:Hier ist der Käferverfolger


OK. Da Du das ja weitergeben musst, hier in Englisch:

Bugs "CGIApplcation"

1) (Linux and Windows): LResources twice in uses of the automatic code

2) (Windows only, does work in Linux): "Access violation" when compiling ("can't stream CGIDataModule1")

3) (Linux, we don't get that far in Windows): "Exception" with no qualifier when starting. This happens before TCGIDatamidule.Create is reached, so no idea how to prevent it.

4) No documentation, no example project, so we don't know how to use this seemingly useful feature.

-Michael
Zuletzt geändert von mschnell am Mi 31. Okt 2007, 08:46, insgesamt 1-mal geändert.

monta
Lazarusforum e. V.
Beiträge: 2809
Registriert: Sa 9. Sep 2006, 18:05
OS, Lazarus, FPC: Linux (L trunk FPC trunk)
CPU-Target: 64Bit
Wohnort: Dresden
Kontaktdaten:

Beitrag von monta »

:?: Was muss ich weitergeben...du kannst dir doch einfach nen Account oben links erstellen. Ich hab damit auch nicht mehr zu tun, als das ich nen Account und drei Bugs eingetragen hab.
Johannes

mschnell
Beiträge: 3444
Registriert: Mo 11. Sep 2006, 10:24
OS, Lazarus, FPC: svn (Window32, Linux x64, Linux ARM (QNAP) (cross+nativ)
CPU-Target: X32 / X64 / ARMv5
Wohnort: Krefeld

Beitrag von mschnell »

monta hat geschrieben::?: Was muss ich weitergeben...du kannst dir doch einfach nen Account oben links erstellen. Ich hab damit auch nicht mehr zu tun, als das ich nen Account und drei Bugs eingetragen hab.

Ach so, Dein Text ist ein Link. Das hatte ich nicht erkannt.

Gruß und Dank,
-Michael

mschnell
Beiträge: 3444
Registriert: Mo 11. Sep 2006, 10:24
OS, Lazarus, FPC: svn (Window32, Linux x64, Linux ARM (QNAP) (cross+nativ)
CPU-Target: X32 / X64 / ARMv5
Wohnort: Krefeld

Beitrag von mschnell »

monta hat geschrieben:Hier ist der Käferverfolger
Done, -Michael

mschnell
Beiträge: 3444
Registriert: Mo 11. Sep 2006, 10:24
OS, Lazarus, FPC: svn (Window32, Linux x64, Linux ARM (QNAP) (cross+nativ)
CPU-Target: X32 / X64 / ARMv5
Wohnort: Krefeld

Beitrag von mschnell »

They scheduled the solution for Lazarus 1.2

Vincent
Beiträge: 17
Registriert: Do 20. Sep 2007, 14:05

Beitrag von Vincent »

All, except the example has been fixed. A missing example won't stop a Lazarus 1.0 release, so post 1.0 is a good target.

mschnell
Beiträge: 3444
Registriert: Mo 11. Sep 2006, 10:24
OS, Lazarus, FPC: svn (Window32, Linux x64, Linux ARM (QNAP) (cross+nativ)
CPU-Target: X32 / X64 / ARMv5
Wohnort: Krefeld

Beitrag von mschnell »

Do you think (3) is fixed ?

I'll do another test (but I can't access the SNV)

-Michael

Vincent
Beiträge: 17
Registriert: Do 20. Sep 2007, 14:05

Beitrag von Vincent »

3) does not happen if you use it correctly, i.e. setting the correct environment variables and setting the correct events.

mschnell
Beiträge: 3444
Registriert: Mo 11. Sep 2006, 10:24
OS, Lazarus, FPC: svn (Window32, Linux x64, Linux ARM (QNAP) (cross+nativ)
CPU-Target: X32 / X64 / ARMv5
Wohnort: Krefeld

Beitrag von mschnell »

You mean that the exception does not happen if the program has been called by Apache or such, as same sets the appropriate environment variable ?

"The correct events" can't be the cause, as the exception happens before the "onCreate" callback is reached, which supposedly is the first chance to do anything (like setting events) in the user code.

I'll do more tests as soon as I have Lazarus running on my newly installed SuSe 10.3

-Michael

Vincent
Beiträge: 17
Registriert: Do 20. Sep 2007, 14:05

Beitrag von Vincent »

I did not spend time to get a working example.

I just noticed that if you run the empty module in a console, you get a good message what is missing.

If you fix the first (calling it like apache does with the correct environment variables), you get the second exception: "Error: : No CGI request handler set."

Antworten