Forum > Networking and Web Programming

I NEED HELP with fpweb components

(1/2) > >>

garlar27:
Hi,
   I'm trying to create an Apache 2.2 module, so I've looked at fpweb demos and I couldn't compile because I had the following error:


--- Quote ---mod_helloworld.lpr(9,10) Fatal: Can't find unit fpapache used by mod_helloworld
--- End quote ---

Later I've read in some thread that copying fpweb source files to the example source it would work. I didn't wanted to do that so I added the source's path to the project and the above error didn't show up again ... but ... I had a new one:


--- Quote ---/usr/share/fpcsrc/2.2.4/packages/fcl-web/src/fpapache.pp(143,40) Error: Identifier not found "ap_hook_handler_t"
--- End quote ---

And when I do Ctrl+Click at "ap_hook_handler_t" and the editor goes to "/usr/share/fpcsrc/2.2.4/packages/httpd20/src/http_config.inc" at line 1131 where is the following code:

--- Code: ---type
  ap_HOOK_handler_t = function(r: Prequest_rec): Integer; cdecl; // Line 1131  ***

--- End code ---
This file is included in "/usr/share/fpcsrc/2.2.4/packages/httpd20/src/httpd.pas" in line 84 as shown here:

--- Code: ---{$include ap_provider.inc}
{$include util_cfgtree.inc}

{$include httpd.inc}
{$include http_config.inc} // line 84 ****
{$include http_core.inc}
{$include http_log.inc}
{$include http_main.inc}
{$include http_protocol.inc}
{$include http_request.inc}
{$include http_connection.inc}
{$include http_vhost.inc}

{$include util_script.inc}
{$include util_time.inc}
{$include util_md5.inc}
{$include ap_mpm.inc}

implementation

--- End code ---
And "httpd.pas" is used by "fpapache.pp".

Changing permissions haven't done any difference.

Now I'm clueless and I need help.

Thanks in advance.

P.S.: By the way, I've been told that there is a lazwebextra.lpk located in /usr/lib/lazarus/0.9.28.2/components/fpweb/ but I couldn't find it... what I have installed is: weblaz.lpk.

garlar27:
   I have just noticed that my Apache version (2.2) and the one that used by Lazarus to compile ("/usr/share/fpcsrc/2.2.4/packages/httpd20/src/httpd.pas") are different :o.
   But I don't know why Lazarus assumes that it has to use "httpd20" instead of "httpd22". I couldn't find a define in the project  %).

   Does anybody knows how can I fix that?

bobo:
You should just delete the HTTPD13 and HTTPD20 directories from your FPC units directory so the compiler will find the right compiled Apache version (2.2) .PPU files first.

Checking your fpc.cfg file(s) would not hurt either to make sure the paths are right and the proper FPC and units are used during compilations.

I would also strongly recommend compiling FPC 2.5.1 from SVN sources as well as Lazarus from the SVN trunk because there were a ton on improvements, fixes, new features implemented in the past year or so in fpweb/fcl-web. FPC 2.2.X is ancient.

garlar27:
Thank you Bobo!!

I will try this:

--- Quote from: bobo on September 29, 2010, 11:58:37 pm ---You should just delete the HTTPD13 and HTTPD20 directories from your FPC units directory so the compiler will find the right compiled Apache version (2.2) .PPU files first.

Checking your fpc.cfg file(s) would not hurt either to make sure the paths are right and the proper FPC and units are used during compilations.


--- End quote ---

   I know my FPC version it's old and weary as well as my Lazarus version, but I don't have pretty clear how to keep two FPC versions without conflicts, and also I haven't tried to do that because a shortage of time and guts  :-[.
   I expect the compiler to behave the same way all the time until a new stable version is released, than the probability of having different bugs from time to time.

bobo:
Let us know how did it go.

BTW, the Lazwebextra package is only for the latest SVN Lazarus (0.9.29/30) and latest SVN FPC (2.5.1), it is a new development. For now, fpweb and lazwebextra is separate because of the latter is still very new, I think it is planned to be merged together when the next Lazarus release happens.
If you need those new developments, you will have to get FPC and Lazarus from the SVN trunk and compile them yourself (not as a big deal as people might think).
I myself is doing this for both the Windows and Linux platforms, because the benefits are far outweigh the drawbacks. The releases are so far from each other for both FPC and Lazarus, that it is well worth doing this to have the latest fixes and developments.

And, because Lazarus is still in beta only, plus the releases are so far apart, the chances are that something will change for you between versions is not that low. So you don't loose much by using the SVN trunk source codes.
You do not need to recompile them every day, you can just check them out, compile them once, and maybe check them out every now and then after, or when a new fix is there for you.

Navigation

[0] Message Index

[#] Next page

Go to full version