Apache 2.4 Modules lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- ahiggins · 2018-02-18 22:06 Just looking for general advice/guidance around creating Apache 2.4 modules, i have not been able to get any of the examples I've found on-line to work. I'm using Debian 9, Apache 2.4, FPC 3.0.4 and Lazarus 1.8.0 ---------------------------------------------------------------------- Ñuño_Martínez · 2018-02-19 10:17 Did you read the "FPC and Apache Modules" wiki  page? ---------------------------------------------------------------------- ahiggins · 2018-02-19 10:46 yep I've read Apache Modules page but was unable to get the example working, I did use httpd24 etc. I also found the following 32bit http://leonardorame.blogspot.ae/2009/07/apache-22x-modules-with- freepascal_29.html 64bit http://leonardorame.blogspot.com/2009/12/apache-22-modules-fpc-64bits- ubuntu-910.html still no joy, I have a feeling I'm not loading the module correctly under Apache 2.4 I'll just keep plodding, many thanks for you reply. ---------------------------------------------------------------------- Thaddy · 2018-02-19 11:13 I would first check if your module has executable rights when deployed: this is not automatically the case. ---------------------------------------------------------------------- ahiggins · 2018-02-19 15:34 @Thaddy I checked the execute permissions and it was set, the error i get when i try to restart Apache is /usr/sbin$ sudo apache2ctl restart apache2: Syntax error on line 231 of /etc/apache2/apache2.conf: Cannot load /usr/lib/apache2/modules/mod_hello.so into server: /usr/lib/apache2/modules/mod_hello.so: undefined symbol: ap_rputs Action 'restart' failed. The Apache error log may have more information. i am out of my depth, but all part of the learning process ---------------------------------------------------------------------- ahiggins · 2018-02-19 17:13 Right, getting nowhere fast with this one, so went back to the start and double checked everything still no joy. So I removed Apache 2.4 and built 2.2.34 from source and recompiled the example so/dll I've been working with, only changes I made was to use httpd22 rather than httpd24 packages, it worked first time, did this to prove to myself I was following the instructions correctly. I shall do some more digging around Apache 24.4 and the httpd24 packages I sure its going to be something really simple ---------------------------------------------------------------------- toby · 2019-08-03 01:23 Quote from: Thaddy on February 19, 2018, 12:13:01 pmI would first check if your module has executable rights when deployed: this is not automatically the case. the rights on the module make no difference - you can chmod 000 mod_hello.so and aoache2 will still load it fine ---------------------------------------------------------------------- zamronypj · 2019-08-05 11:36 If you take a look at https://github.com/graemeg/freepascal/blob/master/packages/httpd24/src /http_protocol.inc ap_rputs() is commented out. I believe ap_rwrite() or ap_rvputs() is function that you need to write something. Example also use ap_rwrite() https://github.com/graemeg/freepascal/blob/master/packages/httpd24/exa mples/mod_hello.pp