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: Building Apache 2.2.x on Windows x64 Page 1, 2  Next
Author
saivert



Joined: 20 Apr 2006
Posts: 7
Location: Norway

PostPosted: Thu 20 Apr '06 17:41    Post subject: Building Apache 2.2.x on Windows x64 Reply with quote

Lucky for me MySQL 5.0 is available as a x64 version. But PHP and Apache is not available in x64 version so I have mentally prepared myself to compile PHP and Apache myself. Of course I only come here for help with Apache, I will seek help for PHP somewhere else.

I am using Microsoft Visual Studio 2005 which comes with a x64 compiler so that's no problem. But since the Apache Software Foundation is not supporting 64 bit technology on Windows (and does not actively support it on Linux as well) I'm in a bit of trouble. All services under Windows x64 (Windows XP x64 Edition or Windows Server 2003 x64 Edition) must be native x64 applications or they will not run.

Do you need to take special consideration regarding the source code when targetting x64? I would like to see a guide for compiling for x64, but meanwhile I will experiment some myself and see what I come up with.


Last edited by saivert on Fri 21 Apr '06 19:16; edited 2 times in total
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Thu 20 Apr '06 17:44    Post subject: Reply with quote

2.2.1 compiles fine without zlib and openssl.

just download the 2.2.1 tarball and use the APR 1.3.0

and your all set to go. Good luck with php, never managed to get that to compile.
Back to top
saivert



Joined: 20 Apr 2006
Posts: 7
Location: Norway

PostPosted: Thu 20 Apr '06 17:57    Post subject: Promising Reply with quote

Good, looks promising Jorge!

1. Are you using Windows x64 yourself?
2. Does 2.2.1 source have more support for x64 than 2.2.0?

I know some parts of the Apache source code is prepared for 64 bit compatibility but I thought that only was for the Linux platform, but maybe that works for Windows x64 as well.
Thanks. I will try the 2.2.1 instead of 2.2.0 which was my original plan.

Update: I have downloaded the source for these components:

  • Apache 2.2.1
  • APR 1.2.7
  • APR iconv 1.1.1
  • APR util 1.2.7
  • PHP 5.1.2
  • openssl-WIN64 Snapshot (20060421)
  • zlib 1.2.3


I have installed ActiveState's ActivePerl for x64 and awk95 (renamed to awk.exe of course) so my build environment should be OK.

This project looks like will be fun. There are many things to learn while I progress.

Just to clear any doubts: I'm not going to compile a 32 bit version of Apache and run it on Windows x64. I will compile Apache using the x64 compiler from Microsoft which generates code that will not run on 32 bit, and requires a 64 bit capable CPU such as AMD64 and EM64T branded CPUs.
Back to top
oxalide



Joined: 25 Apr 2006
Posts: 5

PostPosted: Tue 25 Apr '06 15:15    Post subject: Reply with quote

Hello

Could you please help me with x64 compilation please ?
I've already compile for 32 but what are the main changes for 64 ?

Thanx
Back to top
NthDegree



Joined: 14 Mar 2006
Posts: 14

PostPosted: Tue 25 Apr '06 19:56    Post subject: :shock: Reply with quote

Well the apache binaries on here seem to work for me and I use Windows Server 2003 Enterprise x64 Edition.

Personally I am a dumb@ss when it comes to compiling, I don't really know where to start except for the apache source and Microsoft Visual C++ 2005 Express Edition (or a professional/enterprise edition if I can get one).

So anyone who can walk me through doing it please do, and feel free to treat me like I know jacksh!t because unless it involves ./configure, make and make install I have NO clue whatsoever!
Back to top
saivert



Joined: 20 Apr 2006
Posts: 7
Location: Norway

PostPosted: Wed 26 Apr '06 19:48    Post subject: Managed to geta 32 bit build Reply with quote

Since I have never ever compiled Apache before, I must say that I finally got to compile Apache 2.2.0 for x86 using Visual Studio 2005. It runs okay with standard config.

Now I have to figure out how to swap the 32bit C compiler used in Visual Studio with the x64 compiler. I will have to install latest Platform SDK which includes the x64 compiler and somehow tell Visual Studio to use that compiler instead, or make a custom makefile.
I need help with this people.
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Mon 01 May '06 19:48    Post subject: Reply with quote

Have a look here:
http://www.blackdot.be/?inc=apachebin.htm
for a binary

or here:
http://www.blackdot.be/?inc=apache/compile_x64/index.htm

for instructions on how to compile


Last edited by Jorge on Fri 05 May '06 17:57; edited 1 time in total
Back to top
saivert



Joined: 20 Apr 2006
Posts: 7
Location: Norway

PostPosted: Wed 03 May '06 21:19    Post subject: Thanks for the binary, guide still missing vital parts Reply with quote

Thanks for the binary, but the guide is still missing vital parts. How to select for x64 Build in Visual Studio? There is no Win64 choice there.

I have given up on APache on x64 now. I'm using IIS6 because it's native x64 and works with PHP ISAPI even if it's 32bit. I just activated something using adsutil.vbs adminscript to get it to work.

All I need is a test platform so I can test websites locally.
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Thu 04 May '06 16:05    Post subject: Re: Thanks for the binary, guide still missing vital parts Reply with quote

saivert wrote:
Thanks for the binary, but the guide is still missing vital parts. How to select for x64 Build in Visual Studio? There is no Win64 choice there.

I have given up on APache on x64 now. I'm using IIS6 because it's native x64 and works with PHP ISAPI even if it's 32bit. I just activated something using adsutil.vbs adminscript to get it to work.

All I need is a test platform so I can test websites locally.


you are right i forgot to mention an adition step to get it working as x64
I'll update (probebly slitoff and create a seoerate the tutorial this weekend... thanks for pointing this out)

go to the build configurator while you have vs.net 2005 open, create a new platform and select x64, save and then run InstallBin.
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Fri 05 May '06 17:57    Post subject: Reply with quote

As I promised...
Tutorial is now fixed:

x64 Tutorial:
http://www.blackdot.be/?inc=apache/compile_x64/index.htm
x86 Tutorial:
http://www.blackdot.be/?inc=apache/compile_x86/index.htm
Binaries:
http://www.blackdot.be/?inc=apachebin.htm
Back to top
BobSmith



Joined: 17 May 2006
Posts: 6

PostPosted: Wed 17 May '06 23:28    Post subject: Apache for Windows XP 64bit Reply with quote

Hi Jorge,

Are your binaries suitable to run on Windows XP 64 bit??

Do you know where I can get the binaries for a 64bit version of php and MySQL??
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Thu 18 May '06 15:46    Post subject: Reply with quote

Yes, they should run fine on Windows XP Professioanl x64 and Server x64.

No, i haven't managed to compile php in 64bit nor in 32bit.
MySQL has a 64-bit binary avaible.
Back to top
BobSmith



Joined: 17 May 2006
Posts: 6

PostPosted: Sat 20 May '06 16:32    Post subject: Reply with quote

Thanks Jorge,

I am having troubles installing your binaries. I keep getting the following error when I run httpd -k install :

Syntax error on line 68 of C:/Apache2x64/conf/http.conf : Cannot load C:/Apache2_x64/modules/mod_actons.so into server: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

I have reinstalled many times, but still no luck. All paths in the http.conf file have been set appropriately. Do you have any ideas what the problem may be??

Thanks
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Sun 21 May '06 10:20    Post subject: Reply with quote

Works fine for me

But i think i know what your problem is:
You have installed apache into c:\Apachex64 not c:\Apache_x64 try that.
Back to top
PaRK_7677



Joined: 01 Jun 2006
Posts: 65
Location: Missouri

PostPosted: Thu 01 Jun '06 20:11    Post subject: Reply with quote

I'm glad to have found other people trying ot compile in 64-bit!

Thanks Jorge for the binaries. I had compiled 2.2.0 myself in 64-bit mode but shortly after 2.2.2 came out. Your binaries saved me from redoing all the work. I did notice your binaries still represent themselves as Win32 (in ServerTokens and such). Inside include/os.h you can change this:

Code:
#define PLATFORM "Win32"

to something like:
Code:
#define PLATFORM "x64"



I myself have managed to compile PHP (5.1.2) in 64-bit. http://short-media.com/forum/showthread.php?t=45008 is a short thread about it. After I've been using it I've noticed some spots are still not perfect. File functions (such as file_get_contents) will timeout when not found instead of returning FALSE like they should. I also compiled it using very little modules, only the ones I needed. The hardest part for myself was finding all the 32-bit times "__time32_t" and changing it to "time_t" for 64-bit conversion. This included not only the PHP source but includes from Visual Studio itself.

My configuration command:
Code:

cscript /nologo configure.js "--enable-apache2handler" "--with-mysqli" "--with-mysql" "--without-gd" "--without-iconv" "--without-libxml" "--disable-zlib"
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Fri 02 Jun '06 15:58    Post subject: Reply with quote

I'll have a look into that (PHP),
well i don't know C but shouln't it be posible to detect the platform at compile time?
Back to top
PaRK_7677



Joined: 01 Jun 2006
Posts: 65
Location: Missouri

PostPosted: Fri 02 Jun '06 16:24    Post subject: Reply with quote

Jorge wrote:
I'll have a look into that (PHP),
well i don't know C but shouln't it be posible to detect the platform at compile time?


I thought it would auto-detect (from possibly /D Win32) which system it is but I found out it's static. Since there are separate sources for Linux and Windows, and Win32 is previously the only system it ran on there's no need to have it be dynamic. The source designed for Windows, in 32-bit mode... so they just saved time and made it static. Where I pointed out is where to change it Smile You could even write Linux or OS-X and it wouldn't care!

When I try to build a snapshot of PHP for people to use (with all availible extensions) it goes just fine until it tries to build php5ts.dll then it gives me "unresolved external symbol" errors and fails. So close but I don't know how to fix it Sad

I really don't know C either. I know other languages so I can somewhat understand the structure to get all this stuff done. I hope we all can work together and get an Apache/PHP package going that's 64-bit!
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Sat 03 Jun '06 14:04    Post subject: Reply with quote

PaRK_7677 wrote:
Jorge wrote:
I'll have a look into that (PHP),
well i don't know C but shouln't it be posible to detect the platform at compile time?


I thought it would auto-detect (from possibly /D Win32) which system it is but I found out it's static. Since there are separate sources for Linux and Windows, and Win32 is previously the only system it ran on there's no need to have it be dynamic. The source designed for Windows, in 32-bit mode... so they just saved time and made it static. Where I pointed out is where to change it Smile You could even write Linux or OS-X and it wouldn't care!

When I try to build a snapshot of PHP for people to use (with all availible extensions) it goes just fine until it tries to build php5ts.dll then it gives me "unresolved external symbol" errors and fails. So close but I don't know how to fix it Sad

I really don't know C either. I know other languages so I can somewhat understand the structure to get all this stuff done. I hope we all can work together and get an Apache/PHP package going that's 64-bit!


I mailed WROWE from the httpd-dev list on the platform isseu... he said he'll fix in in HEAD 2.3/2.4 and probebly 2.2 aswel.

Yes i'd really like to see a full 64bit php.
In my free time (wich is little atm) i'm trying to get mod_perl to work first... but it needs a 64bit perl and the one on the internet isn't a complete build!

I had no luck compilinh a 32bit or 64bit pel with VS 2005 as of today.
Back to top
PaRK_7677



Joined: 01 Jun 2006
Posts: 65
Location: Missouri

PostPosted: Sat 03 Jun '06 17:46    Post subject: Reply with quote

Jorge wrote:

I mailed WROWE from the httpd-dev list on the platform isseu... he said he'll fix in in HEAD 2.3/2.4 and probebly 2.2 aswel.

Yes i'd really like to see a full 64bit php.
In my free time (wich is little atm) i'm trying to get mod_perl to work first... but it needs a 64bit perl and the one on the internet isn't a complete build!

I had no luck compilinh a 32bit or 64bit pel with VS 2005 as of today.

Thanks for the help of trying to reach PHP x64. I've found http://ftp.emini.dk/pub/php/win32/zip.zip which includes all the sources, libraries, and DLLs needed to compile the snapshot build of PHP 5.1.x. However, the DLLs and libraries are all 32-bit. You can compile PHP 5.1.x in 32-bit but not 64-bit with it. I've been working (slowly, but surly) to recompile everything in that ZIP into 64-bit. There may be some that can not be (mSQL.dll perhaps, I doubt you can get the code for that!) so they may not be included in a "full" PHP x64. I've got about 30 libraries already recompiled in 64-bit. Not sure they all work perfectly yet but if we can re-create that Zip.zip file structure in 64-bit I believe a "full" PHP x64 can be built. Mr. Green
Back to top
PaRK_7677



Joined: 01 Jun 2006
Posts: 65
Location: Missouri

PostPosted: Sat 03 Jun '06 19:25    Post subject: Reply with quote

Here is a link to download my current limited PHP 5.1.4-x64. Only includes Apache2 API and MySQLi extension.

No promise it will work for you. Can be used with Jorge's Apache 2.2.2-x64. Read the README.txt

http://www.fusionxlan.com/PHP-5.1.4-x64.zip
Back to top


Reply to topic   Topic: Building Apache 2.2.x on Windows x64 View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads Page 1, 2  Next