Installing new Apache module on XAMPP

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Installing new Apache module on XAMPP

Postby andyr36 » 13. August 2014 07:43

Hi all,

i would like to use and test in development environment a module: mod_auth_token
Code: Select all
https://code.google.com/p/mod-auth-token/


How can i do that?


Andrew
andyr36
 
Posts: 4
Joined: 13. August 2014 07:39
Operating System: Win 7 64bit

Re: Installing new Apache module on XAMPP

Postby Nobbie » 13. August 2014 15:24

andyr36 wrote:How can i do that?


Follow Google installation instructions. But this requires:

a) Linux (not Windows)
b) Apache Installation including Librarys and Includes (Development Package) from your Linux Distribution. Not Xampp.

Xampp Windows cannot be extended in this way (as it is Windows and Xampp). You may ask Bitnami to include this module in a coming release, but i dont think they will adapt it. You should switch over to a Linux Distribution, if you need to work with this module.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Installing new Apache module on XAMPP

Postby andyr36 » 13. August 2014 15:47

Ok.

I was looking for Windows. Maybe XAMPP will include it in next releases, in Apache folder there are already plenty of .so files, but i think the plugin desired by me is not so officially accepted or with large popularity.

Thanks for response.
andyr36
 
Posts: 4
Joined: 13. August 2014 07:39
Operating System: Win 7 64bit

Re: Installing new Apache module on XAMPP

Postby gsmith » 13. August 2014 21:25

I see nothing in this module that makes it *nix only. As a matter of fact, it's only dependencies are httpd and APR.

Code: Select all
#include "apr_strings.h"
#include "apr_md5.h"
#include "apr_time.h"
#include "apr_lib.h"

#include "ap_config.h"
#include "httpd.h"
#include "http_config.h"
#include "http_core.h"
#include "http_log.h"
#include "http_protocol.h"
#include "http_request.h"


If you do not see #include <unistd.h> one is almost guaranteed to be able to compile it on Windows. Even then in most cases a little elbow grease modifying it here and there may get it working on Windows anyway.

Googling about I do not see that anyone has compiled this for Windows ever and this module actually seems useful and not just fluff. I guess I'll be the one to do it. I'll reply again when I get it done and it's available for download.
gsmith
 
Posts: 278
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win 10/2012R VS 14,15,16

Re: Installing new Apache module on XAMPP (mod_auth_token)

Postby gsmith » 14. August 2014 00:19

gsmith
 
Posts: 278
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win 10/2012R VS 14,15,16

Re: Installing new Apache module on XAMPP

Postby andyr36 » 14. August 2014 07:27

Hi @gsmith

1. I copied mod_auth_token.so in F:\xampp\apache\modules
2. I installed Visual C++ 2008 SP1 x64 Redistributable Package
3. I added in Apache(httpd.conf) this line at the end of list with LoadModule and saved file
LoadModule auth_token_module modules/mod_auth_token.so
4. The Apache doesnt start (if i comment LoadModule line is starting). No errors in logs.

I am doing something wrong?

Code: Select all
9:23:22 AM  [Apache]    Error: Apache shutdown unexpectedly.
9:23:22 AM  [Apache]    This may be due to a blocked port, missing dependencies,
9:23:22 AM  [Apache]    improper privileges, a crash, or a shutdown by another method.
9:23:22 AM  [Apache]    Press the Logs button to view error logs and check
andyr36
 
Posts: 4
Joined: 13. August 2014 07:39
Operating System: Win 7 64bit

Re: Installing new Apache module on XAMPP

Postby andyr36 » 14. August 2014 07:36

I have Apache 2.4 and in your readme file you write that is for Apache 2.2 only, probably this is the cause.
andyr36
 
Posts: 4
Joined: 13. August 2014 07:39
Operating System: Win 7 64bit

Re: Installing new Apache module on XAMPP

Postby gsmith » 14. August 2014 10:54

Yes, cannot load modules for 2.2 in 2.4 or vice-verse.

The file names have meaning.
Latest XAMPP is 2.4.x 32bit(x86) VC11 if I remember correctly so you would want
mod_auth_token-1.0.6-2.4.x-x86-vc11.zip
gsmith
 
Posts: 278
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win 10/2012R VS 14,15,16

Re: Installing new Apache module on XAMPP

Postby Nobbie » 15. August 2014 11:35

gsmith wrote:I see nothing in this module that makes it *nix only.


I didnt say that the module is unix only - the Google requirements and scripts are linux based.

gsmith wrote:As a matter of fact, it's only dependencies are httpd and APR.


But this "only" is only the problem: you dont need "any" httpd environment, for Xampp Extensions you need the Development Package for the Apache version, which comes with Xampp. Since Bitnami does not deliver development packages any more (or simply i cannot find them), i dont see how to establish a working development environment for Xampp/Apache Modules. You may be lucky by taking any Apache source instead, but usually it does not work.

Even with the Development Package, it always was a pain to develop any extensions on Windows, due to missing documentation. The whole thing is by far easier in a linux environment, as there are standard procedures for building your own components and typically Google also supports linux only.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Installing new Apache module on XAMPP

Postby gsmith » 15. August 2014 13:00

Nobbie, not really.

To be honest I have no idea what an "xampp extension" would be, but the OP's question was about a module for Apache.

Wheneth I looketh into the apache folder in xampp-win32-1.8.3-4-VC11.7z I see an "include" and "lib" folders. Inside the include folder is bunches of .h files and inside the lib folder I see quite a few .lib files in there as well.

Now I'm sure if you look in that download you will see every single one of the #include filename files that I copy and pasted in my first post from the module. Granted, it helps to know which of the libs to link to but if it is an module for Apache it's going to at the absolutely very least need to link to libhttpd.lib! Since there are apr_*.h files included you will at least have to link to libapr-1.lib. If you still happen to get some unresolved symbol _apr_this_and_that errors chances are good you also need to link to libaprutil-1.lib. I've never had to link to libapriconv-1.lib in the 9 years I've been compiling Apache and 3rd party modules, but I guess there is still the chance if however unlikely.

So no, I am not wrong when I said "it's only dependencies are httpd and APR," granted I didn't go into much detail. Of course, you will also need a VC++ 2012 compiler or Windows 8 SDK, and a little know how will help as well.

If all else failed, xampp is using the Apache Lounge VC11 binaries, one could always download the same binaries/includes/libs from there or the VC11 binaries at Apache Haus. :)

G
gsmith
 
Posts: 278
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win 10/2012R VS 14,15,16

Re: Installing new Apache module on XAMPP

Postby Nobbie » 15. August 2014 13:58

gsmith wrote:Nobbie, not really.

To be honest I have no idea what an "xampp extension" would be, but the OP's question was about a module for Apache.


See the topic: Apache module on XAMPP. I simply shortened to "xampp extension". Of course, Xampp is only an abbrev. - but i am pretty sure, you all know what is meant.

gsmith wrote:Wheneth I looketh into the apache folder in xampp-win32-1.8.3-4-VC11.7z I see an "include" and "lib" folders. Inside the include folder is bunches of .h files and inside the lib folder I see quite a few .lib files in there as well.


So this seems to be the "Development Package". I dont know this, i have never seen a 7zip Xampp Package before.

gsmith wrote:So no, I am not wrong when I said "it's only dependencies are httpd and APR,"


I did not say its wrong, but you cannot take any httpd source and libraries - and i did not know that there is a 7zip package including libraries and include files. They have to match the Xampp configuration.

gsmith wrote: granted I didn't go into much detail. Of course, you will also need a VC++ 2012 compiler or Windows 8 SDK, and a little know how will help as well.


Simply do it.

gsmith wrote: If all else failed, xampp is using the Apache Lounge VC11 binaries, one could always download the same binaries/includes/libs from there or the VC11 binaries at Apache Haus. :)


Again - simply do it. If you can build a working module under Xampp - ok. Anyway - with a linux distribution you already would have been finished. It is by far easer to make und to build and there is no (really none) reason to stay on Windows for an Apache environment. There is plenty of support for linux, none for Windows. On Windows you have to fight on yourself. I would not do that (i tried a couple of years ago, i dont remember what was the goal, but it was a pain).
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Installing new Apache module on XAMPP

Postby gsmith » 15. August 2014 19:46

Nobbie wrote:
gsmith wrote:Nobbie, not really.

To be honest I have no idea what an "xampp extension" would be, but the OP's question was about a module for Apache.
See the topic: Apache module on XAMPP. I simply shortened to "xampp extension". Of course, Xampp is only an abbrev. - but i am pretty sure, you all know what is meant.

Exactly, isn't that what I said? Looks like that is what I said when I said the question was about an Apache module.
An Apache module is an Apache module regardless of and completely separate of Xampp. The only thing that does make any difference is x86 vs. x64, platform (win/os x/sun spark/etc) and the version of Apache you are compiling for (2.0/2.2/2.4). I suppose I was ingnorant assuming the OP was not wanting a linux module to stuff into his/her Windows Apache.

Nobbie wrote:So this seems to be the "Development Package". I dont know this, i have never seen a 7zip Xampp Package before.

Nope, these files are installed via the xampp-win32-1.8.3-4-VC11-installer.exe installer as well, I just installed it on my thrash box to make sure.

Nobbie wrote:
gsmith wrote:So no, I am not wrong when I said "it's only dependencies are httpd and APR,"
I did not say its wrong, but you cannot take any httpd source and libraries - and i did not know that there is a 7zip package including libraries and include files. They have to match the Xampp configuration.

"Any" granted, but everything needed to build this module short of the compiler are in your installed Xampp, since that is what you would be building the module for, no?.

Nobbie wrote:
gsmith wrote: granted I didn't go into much detail. Of course, you will also need a VC++ 2012 compiler or Windows 8 SDK, and a little know how will help as well.
Simply do it.

But, you said it couldn't! You said it would require "Linux (not Windows)". Your #2 was correct, but it has been supplied Xampp for Windows was installed, at least the most recent zip/7z/exe. Your #1 (needing Linux) however was wrong.

I have done it anyway, I built the module, for both x86 & x64, for both Apache 2.2.x & 2.4.x and two different VC versions one being the same as these Xampp packaged Apache Lounge binaries.

Nobbie wrote:
gsmith wrote: If all else failed, xampp is using the Apache Lounge VC11 binaries, one could always download the same binaries/includes/libs from there or the VC11 binaries at Apache Haus. :)
Again - simply do it. If you can build a working module under Xampp - ok. [Linux rant removed]

I can, I did, you could if you had the need and the OP could.
gsmith
 
Posts: 278
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win 10/2012R VS 14,15,16

Re: Installing new Apache module on XAMPP

Postby Nobbie » 15. August 2014 21:44

gsmith wrote:....


Es wird immer schlechter, Du begreifst einfach nicht, worum es hier geht. Und da ich Deine dümmlichen Schlaumicheleien Leid bin, kannst Du jetzt gerne mal auf Deutsch lesen. Liefere Dein Modul an den Fragesteller aus, alles andere ist nur dämliches Gesülze.

Du bist einfach ein dummer Laller, ein blindes Huhn, was auch mal ein Korn findet, aber sonst nichts. Du begreifst nicht, warum es für "Ottonormalverbraucher" unmöglich ist, sich solche Module selbst zu bauen. Aber genau das ist hier gefordert - und nicht irgendjemand, der es nach ein paar Tagen Fummelei hinbekommen hat. Du musst noch viel lernen, bevor Du verstehst, was GUTEN Support ausmacht. Dumpfbackige Rechthaberei gehört nicht dazu.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Installing new Apache module on XAMPP

Postby Altrea » 15. August 2014 22:57

enough bla bla here.

closed
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 119 guests