Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-04

Apache Modules without LResources

10 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Giovanni Premuda

Hello,
I'm in the process of converting a relatively complex LMS from Delphi to fpc.
In Delphi I was using a descendant of TCustomWebDispatcher instead of a TWebModule in order to avoid depending on DFM resources. Is it possible to use fclweb without linking LResources and a lazarus resource file?
Thanks ,

Giovanni

Reply by email

Joost van der Sluis
to Giovanni Premuda

Op dinsdag 28-04-2009 om 02:58 uur [tijdzone +0200], schreef Giovanni Premuda:

Show quoted text 7 lines
Hello, I'm in the process of converting a relatively complex LMS from Delphi to fpc. In Delphi I was using a descendant of TCustomWebDispatcher instead of a TWebModule in order to avoid depending on DFM resources. Is it possible to use fclweb without linking LResources and a lazarus resource file?

One way is without using modules, select 'File-New-Custom CGI Program' from the lazarus-menu.

Another way is using the 'normal' web-module, but remove it's resource-file. So you have to create all do
that you can simply remove the LResources from the uses-line, and remove the {$I unit1.lrs} line.

Joost.

Reply by email

Giovanni Premuda
to Joost van der Sluis
Joost van der Sluis wrote 10 lines
Op dinsdag 28-04-2009 om 02:58 uur [tijdzone +0200], schreef Giovanni Premuda: > Is it possible to use fclweb without linking LResources and a lazarus > resource file? > One way is without using modules, select 'File-New-Custom CGI Program' from the lazarus-menu.

This seems to produce a simple CGI app, not an apache module.

Another way is using the 'normal' web-module, but remove it's resource-file. So you have to create all do that you can simply remove the LResources from the uses-line, and remove the {$I unit1.lrs} line

And this is the first thing I tried but the module fails miserably with error:

- *Failed to initialize component: No streaming method available

which makes me think the module is actually looking for a resource, especially as the module works when i include a stub webmodule resource.

*

Reply by email

ABorka
to Giovanni Premuda

Not sure about this error, but make sure you are using the latest SVN source code for FPC because recently there were multiple bug fixes done in fcl-web

Giovanni Premuda wrote 30 lines
Joost van der Sluis wrote: > Op dinsdag 28-04-2009 om 02:58 uur [tijdzone +0200], schreef Giovanni > Premuda: > >> Is it possible to use fclweb without linking LResources and a lazarus >> resource file? >> > > One way is without using modules, select 'File-New-Custom CGI Program' > from the lazarus-menu. > This seems to produce a simple CGI app, not an apache module. > Another way is using the 'normal' web-module, but remove it's > resource-file. So you have to create all do > that you can simply remove the LResources from the uses-line, and remove > the {$I unit1.lrs} line And this is the first thing I tried but the module fails miserably with error: - *Failed to initialize component: No streaming method available which makes me think the module is actually looking for a resource, especially as the module works when i include a stub webmodule resource. * _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Giovanni Premuda
to ABorka
ABorka wrote
Not sure about this error, but make sure you are using the latest SVN source code for FPC because recently there were multiple bug fixes done in fcl-web

I've using fpc 2.2.4 but I downloaded fcl-web from subversion and applied some of your unapplied patches I found on Mantis, which improve Delphi compatibility quite a bit.
I believe this is more a problem of TDataModule, though.

Reply by email

ABorka
to Giovanni Premuda

I think all those patches are now applied - with minor changes - by Joost in the latest SVN.

Giovanni Premuda wrote 14 lines
ABorka wrote: > Not sure about this error, but make sure you are using the latest SVN > source code for FPC because recently there were multiple bug fixes > done in fcl-web I've using fpc 2.2.4 but I downloaded fcl-web from subversion and applied some of your unapplied patches I found on Mantis, which improve Delphi compatibility quite a bit. I believe this is more a problem of TDataModule, though. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Joost van der Sluis
to Giovanni Premuda: This seems to produce a simple CGI app, not an apache module. And this is the first…

Op dinsdag 28-04-2009 om 23:21 uur [tijdzone +0200], schreef Giovanni Premuda:

Show quoted text 12 lines
Joost van der Sluis wrote: > Op dinsdag 28-04-2009 om 02:58 uur [tijdzone +0200], schreef Giovanni > Premuda: > >> Is it possible to use fclweb without linking LResources and a lazarus >> resource file? >> > > One way is without using modules, select 'File-New-Custom CGI Program' > from the lazarus-menu. > This seems to produce a simple CGI app, not an apache module.

Ok, 'File-New-Custom Apache Module' and you'll have an apache module.

(But you really need svn lazarus and fpc to get this really to work)

Show quoted text 11 lines
> Another way is using the 'normal' web-module, but remove it's > resource-file. So you have to create all do > that you can simply remove the LResources from the uses-line, and remove > the {$I unit1.lrs} line And this is the first thing I tried but the module fails miserably with error: - *Failed to initialize component: No streaming method available which makes me think the module is actually looking for a resource, especially as the module works when i include a stub webmodule resource.

That's indeed a TDataModule issue.

Joost

Reply by email

Giovanni Premuda
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 8 lines
On Mon, Apr 27, 2009 at 9:58 PM, Giovanni Premuda wrote: > Is it possible to use fclweb without linking LResources and a lazarus > resource file? > Why don't you want to have the resource file?

Fundamentally because if I could avoid LResources my module could be compiled using only fpc, as I create all my actions programmatically.

Ciao,
Giovanni

Reply by email