Recent

Author Topic: [Solved] Apache Modules  (Read 3671 times)

ahiggins

  • Jr. Member
  • **
  • Posts: 92
[Solved] Apache Modules
« on: February 28, 2018, 04:39:09 pm »
Ok what am I missing here?, I Select File, New... Apache Module from the file menu, but I am unable to compile the project, Am I doing something wrong. It fails with regards the Application identifier (I'm guessing due to no TForm or the like please see attached). Its not a big deal, I can just create a library as I normally would, I just like to use the features of the IDE where I can.

 
« Last Edit: March 02, 2018, 02:32:09 pm by ahiggins »

nummer8

  • Full Member
  • ***
  • Posts: 108
Re: Apache Modules
« Reply #1 on: March 01, 2018, 09:18:39 am »
Hi,

I check out several older versions of lazarus. The fpapache unit is changed a lot two years ago.
The examples haven't changed.
I added the Application to the var. Now the module compiles.
In the previous version of the fpapache module this was handled in the pfapache module.

Code: Pascal  [Select][+][-]
  1. Var
  2.   DefaultModule : module; {$ifdef unix} public name ModuleName;{$endif unix}
  3.   Application:TApacheApplication;     //<=======
  4.  
  5. Exports defaultmodule name ModuleName;
  6.  
  7. begin
  8.   Application.Title:='mod_apache1';
  9.   Application.ModuleName:=ModuleName;
  10.   Application.HandlerName:=HandlerName;
  11.   Application.SetModuleRecord(DefaultModule);
  12.   Application.Initialize;
  13. end.
  14.  

I haven't used the apache module and I haven't tested it but this could be a starting point.
Hope this helps.

Jos

ahiggins

  • Jr. Member
  • **
  • Posts: 92
Re: Apache Modules
« Reply #2 on: March 01, 2018, 02:50:05 pm »
Jos,

many thanks for getting back, kind of make more sense now to me.
I added the the suggested line, and it compiles with no errors.

but i get a "Segmentation fault" reported when i try to load the mod.

kind regards

Tony

nummer8

  • Full Member
  • ***
  • Posts: 108
Re: Apache Modules
« Reply #3 on: March 01, 2018, 03:02:43 pm »
Tony,

Like I wrote. I never used it so I could not tell you why you get this error.

Here a link to the files in the trunk.
https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/fcl-web/src/base/
and the according bugreport which is mentioned.
https://bugs.freepascal.org/view.php?id=26301

I will create a module and try to use it. Maybe I can find something.

Jos




ahiggins

  • Jr. Member
  • **
  • Posts: 92
[Solved] Re: Apache Modules
« Reply #4 on: March 02, 2018, 02:31:24 pm »
Jos,

Finally made some progress, thanks to your tips and the forum links.


Application:TApacheApplication;     //<======= I did not use this line but it sure did put me on the right track,
what I did was to include the "custapache" unit in the uses statement at the beginning, this allowed me to compile the demo project without any amendments.

Just a quick note of thanks to this forum, in my job I get given a problem and the solution I'm expected to come up with  is always required to be robust, fast and needed by yesterday! Without FPC/Lazarus and this forum I'm sure my job would be a lot more difficult. I've posted 2 questions in the last week or so regarding Apache Modules and had answers/tips/advise within a matter of hours, long live FPC/Lazarus!!!. I'll get of my soap box now.   
 




 

TinyPortal © 2005-2018