logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Building & Member Downloads View previous topic :: View next topic
Reply to topic   Topic: compile mod_ftp for Apache 2.4.x ?
Author
lunter



Joined: 12 May 2011
Posts: 10

PostPosted: Thu 08 Mar '12 9:19    Post subject: compile mod_ftp for Apache 2.4.x ? Reply with quote

Is it posible to compile mod_ftp?

It is ftp protocol support for Apache.

http://httpd.apache.org/mod_ftp/


Last edited by lunter on Thu 08 Mar '12 12:26; edited 1 time in total
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Thu 08 Mar '12 12:18    Post subject: Reply with quote

There is a binary at http://www.apache.org/dist/httpd/binaries/win32/

Steffen
Back to top
lunter



Joined: 12 May 2011
Posts: 10

PostPosted: Thu 08 Mar '12 12:23    Post subject: Reply with quote

There is one problem: do not work on Apache 2.4

Code:
httpd.exe: Syntax error on line 177 of C:/Program Files/Apache Software
Foundati
on/Apache2.4/conf/httpd.conf: Cannot load C:/Program Files/Apache Software
Found
ation/Apache2.4/modules/mod_ftp.so into server: Could not locate a specific
procedure.


httpd.conf line 177:
Code:
LoadModule ftp_module modules/mod_ftp.so


Is any way to compile it for Apache 2.4 ???
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Thu 22 Mar '12 19:42    Post subject: Reply with quote

I tried some changes to mod_ftp to make it compile with Apache 2.4. It is not nearly ready to check in yet, since I haven't tested it on Unix; but it seems to work OK on Windows with the ApacheLounge 2.4.1 binary: httpd-2.4.1-win32.zip 28 Feb '12.

I put all the mod_ftp changes that I have so far in a patch file.

You will need these tools installed to compile mod_ftp on Windows32: To compile mod_ftp, open a "Windows SDK 7.1 Command Prompt" from the Start menu, change to a working directory (with the patch file in it), and do this:
Code:
@rem Get the source code
SVN checkout http://svn.apache.org/repos/asf/httpd/mod_ftp/trunk   mod_ftp
CD mod_ftp
@rem  Apply the patch
TYPE ..\mod_ftp_2.4.patch | PATCH -p0
@rem compile mod_ftp
NMAKE  -f Makefile-ftp.win  INSTDIR=C:\Apache24
@rem Install mod_ftp in the Apache 2.4 modules directory
COPY /Y  .\modules\ftp\Release\mod_ftp.so  C:\Apache24\modules\
COPY /Y  .\modules\ftp\Release\mod_ftp.pdb C:\Apache24\modules\

If you compile mod_ftp for Apache 2.4.1 and try it, please let me know how well it works for you.

-tom-


Last edited by tdonovan on Sat 30 Apr '16 15:45; edited 1 time in total
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Thu 22 Mar '12 22:26    Post subject: Reply with quote

Thanks Tom,

The core_filter_ctx had me stumped.
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Thu 22 Mar '12 23:56    Post subject: Reply with quote

It baffled me too! I'm not very enthused about the fix in the patch.

I'm not sure which is true:
    * Each filter is now supposed to define core_filter_ctx as they see fit, like in server/core_filters.c (and now also in ftp_data_connection.c) I don't see it used anywhere else.

    * It's a mistake, and struct core_filter_ctx should be defined in include/http_core.h, along with core_ctx_t.
I guess I've been away from the httpd code for too long now.

-t-

p.s. It looks like Stefan F. noticed the problem too, see Rev 1235019. Not in any release yet - but the right fix will be to call ap_create_core_ctx when it is available.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 23 Mar '12 1:01    Post subject: Reply with quote

I thought they squeaked all this in before 2.4.1
http://svn.apache.org/viewvc?view=revision&revision=1240478

You also learned me some more as this came as a complete surprise;

#if AP_MODULE_MAGIC_AT_LEAST(20111203,0)
/* AP24 request fields */
r->useragent_addr = c->client_addr;
r->useragent_ip = c->client_ip;
#endif

I was a bit curious for a time why all the CLIENT_IP & CLIENT_ADDR and not simply

#if AP_MODULE_MAGIC_AT_LEAST(20111203,0)
#define remote_ip client_ip
#define remote_addr client_addr
#endif

but I can see a case where peer_ip/peer_addr might need to be used and the above would give it client_ip/client_addr instead. I've not run into a case where both have been in use yet, but I'd bet there is something out there that does.

Thanks again.
BTW, there is a PR for this
https://issues.apache.org/bugzilla/show_bug.cgi?id=52855
Back to top
RichardWH



Joined: 15 Apr 2012
Posts: 3
Location: Sweden, Helsingborg

PostPosted: Sun 15 Apr '12 20:43    Post subject: Unable to compile mod_ftp Reply with quote

Hi

I'm having a problem compiling mod_ftp with VC10 towards apache 2.4.1

Tried to follow directions above, but I get a lot of "error LNK2019: unresolved external symbol __imp_apr_..."

I'm really doing "google hacking" here, but I get the feeling that the compiler for some reason adds the "__imp_" thing and then the linker can't match that towards the VC10 build of apache 2.4.1.

I wouldn't mind some advice on how to proceed (or maybe someone could do the compile for me Smile )

ndJoy::Richard
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Mon 16 Apr '12 19:09    Post subject: Reply with quote

you compiling at command line or from the IDE?
Back to top
RichardWH



Joined: 15 Apr 2012
Posts: 3
Location: Sweden, Helsingborg

PostPosted: Mon 16 Apr '12 23:10    Post subject: Reply with quote

Ahh... Could of been more clear on that (sorry)

Short answer: cmd line

Long answer:
Tried to follow tdonovans post from "Thu 22 Mar '12 18:42"

Noticed that when I open the command prompt it says "Targeting Windows 7 x64 Debug", but I thought it shouldnt matter since the make file says win32 and NDEBUG

ndJoy::Richard
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 17 Apr '12 2:00    Post subject: Reply with quote

ok, well the error says it's not finding one or both of libapr-1.lib or libaprutil-1.lib, which should be located in INSTDIR\lib

So, is INSTDIR pointing the base folder of an already precompiled Apache 2.4.x? If yes, are those two files listed above located in INSTDIR\lib?

As far as Windows 7 Debug 64 bit, it will build a debug build. Edit the properties of the CMD Shell shortcut and add to the end of the target:
/xp /release
Back to top
RichardWH



Joined: 15 Apr 2012
Posts: 3
Location: Sweden, Helsingborg

PostPosted: Tue 17 Apr '12 20:12    Post subject: Reply with quote

Well, well, well ...

It was a while ago, programing ..
Couldn't make it work, until I realised I have to delete the old .obj files (to let make do its thing)

Anyway, got working by

Started the "Windows SDK 7.1 Command Prompt"
(C:\Program Files\Microsoft SDKs\Windows\7.1)

cd bin

setenv /release /x86

Then it was just to follow tdonovans posting

Thanx a million for setting me on the right track (and a really god site)

(copied the mod_ftp files and VIOLA - let there be FTP on Apache 2.4.1/VC10)

ndJoy::Richard
Back to top
Diammo



Joined: 28 Jul 2008
Posts: 9

PostPosted: Sat 16 Mar '13 14:12    Post subject: Reply with quote

Do it have the binary compiled to download?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sat 16 Mar '13 20:40    Post subject: Reply with quote

I have VC9 builds here: https://www.apachehaus.net/modules/
Back to top
Diammo



Joined: 28 Jul 2008
Posts: 9

PostPosted: Sat 16 Mar '13 21:11    Post subject: Reply with quote

It work. ty Smile
Back to top


Reply to topic   Topic: compile mod_ftp for Apache 2.4.x ? View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads