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: Apache Compilation with PHP and OpenSSL in VS 2008 Page 1, 2  Next
Author
meet2sanjay



Joined: 30 Dec 2011
Posts: 35
Location: GURGAON, INDIA

PostPosted: Fri 30 Dec '11 11:55    Post subject: Apache Compilation with PHP and OpenSSL in VS 2008 Reply with quote

Hi All,
I am very new in APACHE 2.3. If anybody have some doucment which can guide me how can i compile APACHE WEB SERVER wtih PHP 5.3 and OpenSSL 1.0.

Please also provide some information such as:
1. System Requirement for APACHE 2.2.21 or higher version comipliation.
2. What are the initial steps.

And other information which you think necessary for me.

Thanks in advance.

Best Regards,
Sanjay Kumar
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 30 Dec '11 20:03    Post subject: Reply with quote

First you need to compile apache. Than php.

For building apache you need to install perl on your system.
You already have installed VC9, you also need the SDK.

I have a build folder on my C drive

Sources you need (source code versions current at this time)

httpd-2.3.16-beta.tar.gz
httpd-2.3.16-beta-deps.tar.gz
http://httpd.apache.org/download.cgi#apache23

next unpack into apache.2.3.16-beta\srclib
apr-iconv-1.2.1
http://apr.apache.org/download.cgi
after unpacking rename the folder to apr-iconv

OpenSSL 0.9.8r, do not use 1.0 that is not compatible with PHP at the moment.
http://openssl.org/source/
(for me it worked only with winrar, cause there are some symbolic links in the file)
after unpacking rename the folder to openssl

zlib 1.2.5
http://zlib.net/
after unpacking rename the folder to zlib

pcre last version
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
after unpacking rename the folder to pcre

now open a command line from VC

Code:

cd \build\2.3.16-beta
srclib\apr\build\lineends.pl

srclib\apr\build\cvtdsp.pl -2005

cd srclib\zlib
nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF -I." OBJA="inffas32.obj match686.obj"
MT -manifest zlib1.dll.manifest -outputresource:zlib1.dll;2

cd ..\..\srclib\openssl
perl Configure VC-WIN32 --prefix=/Apache23 --openssldir=/Apache23/conf enable-camellia disable-idea

ms\do_nasm
nmake /f ms\ntdll.mak


Open Apache.dsw with VS8/VS9 and answer "Yes to All" to the "convert projects" question
Select relase win32

Now build InstallBin

Test your build

I hope I didn't forget a thing. If yes others may correct me and you can ask.

For php there is a very nice step by step tutorial
https://wiki.php.net/internals/windows/stepbystepbuild
Back to top
meet2sanjay



Joined: 30 Dec 2011
Posts: 35
Location: GURGAON, INDIA

PostPosted: Mon 02 Jan '12 5:59    Post subject: Thanks Reply with quote

Thanks James
for nice tips...
Back to top
meet2sanjay



Joined: 30 Dec 2011
Posts: 35
Location: GURGAON, INDIA

PostPosted: Thu 05 Jan '12 7:44    Post subject: NMAKE : fatal error: U1073 don't know how to make 'inffass32 Reply with quote

Hi James,

I am trying to compile as you suggested above.
But when i execute the command line

cd srclib\zlib
nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF -I." OBJA="inffas32.obj match686.obj"
MT -manifest zlib1.dll.manifest -outputresource:zlib1.dll;2


I am getting follwing error:
NMAKE : fatal error: U1073 don't know how to make 'inffass32.obj'
Stop

Please help.

Thanks & Regards,
Sanjay Kumar
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 05 Jan '12 12:32    Post subject: Reply with quote

I'm not sure what happened. Currently I don't have compiler on my system, so I can't try anything at the moment.
Well you could also open srclib\zlib\contrib\vstudio\vc9\zlibvc.sln with your visual studio and compile it. That should work, too.
Back to top
tdonovan
Moderator


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

PostPosted: Thu 05 Jan '12 12:40    Post subject: Reply with quote

re: your error message:
Code:
NMAKE : fatal error: U1073 don't know how to make 'inffass32.obj'

The file name is inffas32.obj - with only one 's'.

FYI - this .obj file is built from the source file: srclib\contrib\masmx86\inffas32.asm in zlib version 1.2.5. You may want to check that this source file is present on your system.

-tom-
Back to top
meet2sanjay



Joined: 30 Dec 2011
Posts: 35
Location: GURGAON, INDIA

PostPosted: Fri 27 Jan '12 6:13    Post subject: Compilation of Apache version 2.2.21 Reply with quote

Hi,

Please tell me, compilation of apache version 2.2.21 would same as version 2.3.
If it is not then please tell me the steps.

Thanks & Regards,
Sanjay Kumar
Back to top
glsmith
Moderator


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

PostPosted: Fri 27 Jan '12 7:49    Post subject: Reply with quote

Yes it is. But hold on a couple days, 2.2.22 may be on the way.
Also, OpenSSL is at 0.9.8t now.
Back to top
meet2sanjay



Joined: 30 Dec 2011
Posts: 35
Location: GURGAON, INDIA

PostPosted: Fri 27 Jan '12 13:11    Post subject: Error occur when execute the: NMAKE /f ms\ntdll.mak Reply with quote

Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.

Building OpenSSL
nasm -f win32 -o tmp32dll\x86cpuid.obj tmp32dll\x86cpuid.asm

'nasm' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'nasm' : return code '0x1'
Stop.

Please reply as soon as poosible. I am stucked.

Thanks & Regards,
Sanjay Kumar
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 27 Jan '12 14:54    Post subject: Reply with quote

nasm is a tiny assambler. Can be found on http://www.nasm.us/pub/nasm/releasebuilds/2.10rc8/win32/
Back to top
meet2sanjay



Joined: 30 Dec 2011
Posts: 35
Location: GURGAON, INDIA

PostPosted: Mon 30 Jan '12 8:31    Post subject: NMAKE : fatal error U1077: 'awk' : return code '0x1' Reply with quote

Getting follwing error when building InstallBin.

NMAKE : fatal error U1077: 'awk' : return code '0x1'

When i googled this i found i need to download awk.exe.
Please tell me it is necessay to download this file. If yes then provide me URL if possible. Also tell me in which path i have to store this awk.exe.

Really guys your help is very very helpfull to me. Keep helping me like this.. Very Happy

Thanks & Regards,
Sanjay Kumar
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 30 Jan '12 11:19    Post subject: Reply with quote

http://gnuwin32.sourceforge.net/packages/gawk.htm
Download the binary zip and rename gawk.exe to awk.exe

I have all those files in an extra folder and added it to the %PATH% Variable. See http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx
Back to top
meet2sanjay



Joined: 30 Dec 2011
Posts: 35
Location: GURGAON, INDIA

PostPosted: Tue 31 Jan '12 7:28    Post subject: Thanks to ALL Reply with quote

Hi,
I just wanted to say thanks to all of you. From your help i compiled successfully APACHE now i am going to complile PHP and except the same help there also.

I have a little question. After compilation i found in modules folder two types of file one is .so and other is .pdb.
Could you please tell me what is this pdb file. Do i need these files to create installation(.msi) file.
And also tell me, should i create .msi file after PHP fompilation or right now i can create it.

Thanks,
Sanjay Kumar
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 31 Jan '12 15:53    Post subject: Reply with quote

The pdb files are for debugging and usually not needed.
msi files... well most users on apachelounge prefer to have a zip file and not a msi file. I don't see a need to have a msi file unless you want to run something after extracting the files aka installation.
Back to top
meet2sanjay



Joined: 30 Dec 2011
Posts: 35
Location: GURGAON, INDIA

PostPosted: Thu 02 Feb '12 10:54    Post subject: PHP COMPILATION FOR APACHE Reply with quote

Hi,

I just want to know what is requierement for compiling of PHP.
Is it necessary to have windows server 2008?
Can i compile it on Windows XP?
If yes then how...

Thanks,
Sanjay Kumar
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 03 Feb '12 10:43    Post subject: Reply with quote

Sure you can compile php on XP, you need only Visual Studio 2008 (express).

There is very nice Step by step how to: https://wiki.php.net/internals/windows/stepbystepbuild

If you have a question please ask again
Back to top
meet2sanjay



Joined: 30 Dec 2011
Posts: 35
Location: GURGAON, INDIA

PostPosted: Fri 03 Feb '12 14:03    Post subject: PHP Compilation Reply with quote

Hi James,

Thanks for your reply.
I am follow the same thing which is mentioned in given link. But i am getting following error

'cscript' is not recognized internal or external command.

hope u got the problem.

Thanks & Regards,
Sanjay Kumar
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 03 Feb '12 14:26    Post subject: Reply with quote

Well that should be installed by default since SP2 in XP... however here is the download link http://www.microsoft.com/download/en/details.aspx?id=8247
Back to top
meet2sanjay



Joined: 30 Dec 2011
Posts: 35
Location: GURGAON, INDIA

PostPosted: Mon 06 Feb '12 7:57    Post subject: Reply with quote

Hello James,

Thanks for your help. But my problem is still existing.

Actually i have windows XP with SP3. When i run CSCRIPT command on command prompt it works.

But when i set the environment for PHP compilation by the command
setenv /x86 /xp /release

In this environment, I am not able to run the Cscript command. I executed follwing command successfully
1. setenv /x86 /xp /release
2. cd c:\php-sdk\
3. bin\phpsdk_setvars.bat
4. bin\phpsdk_buildtree.bat php53dev
5. cd C:\php-sdk\php53dev\vc9\x86\php5.3

but when i execute the following command
6. buildconf

it throws error that CSCRIPT is not recognized internal or external command.

waiting for respone.

Thanks & Regards,
Sanjay Kumar
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 06 Feb '12 13:14    Post subject: Reply with quote

It seems C:\Windows\System32 is not in the %PATH% Variable.

So here the way to avoid this problem
Code:

setenv /x86 /xp /release
cd c:\php-sdk\
bin\phpsdk_setvars.bat
bin\phpsdk_buildtree.bat php53dev


Code:

cd C:\php-sdk\php53dev\vc9\x86\php5.3-xyz
SET PATH=C:\Windows\System32;%PATH%
buildconf


--- edit ---
posted this also in the PHP windows internals mailing list


Last edited by James Blond on Wed 08 Feb '12 11:13; edited 2 times in total
Back to top


Reply to topic   Topic: Apache Compilation with PHP and OpenSSL in VS 2008 View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads Page 1, 2  Next