Re: [INTERNALS-WIN] Build Windows PHP5.3 extension to work with Apache 2.2

From: Date: Wed, 30 Sep 2009 19:31:01 +0000
Subject: Re: [INTERNALS-WIN] Build Windows PHP5.3 extension to work with Apache 2.2
References: 1 2 3  Groups: php.internals.win 
Request: Send a blank email to internals-win+get-628@lists.php.net to get a copy of this message
Pierre, Andy, Thank you both for your responses. They are very much appreciated. Using Pierre's suggestion, I was able to take the VC9 Apache build from Apache Lounge and match that up with the thread-safe VC9 build of PHP. After a few configuration flag changes in my VC9 PHP build environment, I produced a PHP extension which works quite nicely. One issue I did need to work around was getting my source files to detect values set during configuration. It seems to not work the same as previous versions. Traditionally, inside my config.w32 file is this logic: <from config.w32> if (PHP_FOO != "no") { ... if (PHP_APACHE2_2HANDLER!="no") { ...
     AC_DEFINE("FOO_APACHE", 1, "Build FOO with Apache support");
     STDERR.WriteLine("Notice: " + "Building FOO extension with Apache 2.2 support");
... } ... } </from config.w32> In the past, the above logic set a define called FOO_APACHE using the AC_DEFINE configuration directive. This define could be detected during the build. I used that flag within my source code to control various code features. For instance, this code is from the extension header file: <from php_foo.h> #if FOO_APACHE #define PHP_FOO_VERSION "X.X Apache" #else #define PHP_FOO_VERSION "X.X non-Apache" #endif </from php_foo.h> However, with this new build environment, it does not appear to be passing that define into the Makefile. It is possible this is my first Apache target using a Windows build and I am simply trying to equate a non-compatible concepts from phpize and config.m4. However, this is something I was looking to have supported and did not function. Is this something that needs to be handled differently or is it just not supported for the Windows build environment? In the end, I manually placed the define in my header. As such, I do not have an immediate need for resolution. Going forward, I would like to get back to where the configuration options properly direct the build. Thanks, Chris Kukuchka Sequoia Group, Inc. Pierre Joye wrote:
hi, The fastcgi module is available for all Apache, so I would recommend to use the "normal" version if you like to have support from php.net. Cheers, On Wed, Sep 30, 2009 at 4:22 AM, Andi Gutmans <andi@zend.com> wrote:
Zend Server (http://www.zend.com/products/server/) has a FastCGI module for Apache so that should work for you (no thread-safe PHP or VC6 required). If you need any more details just drop me a note and I'll intro you to someone who can help. Andi
    
-----Original Message-----
From: Chris Kukuchka [mailto:chrisk@sequoiagroup.com] Sent: Tuesday, September 29, 2009 3:41 PM To: internals-win@lists.php.net Subject: [INTERNALS-WIN] Build Windows PHP5.3 extension to work with
      
Apache
2.2 Hello, I have a custom PHP extension which I have been working with and
      
growing
since the start of PHP 5.x. At this time, I am trying to make it work with PHP 5.3. It has been successfully built using VC9 and it works with FastCGI under IIS. However, I have a site where it needs to work under Apache. From my searching, I am already familiar with the writeup on the PHP Wiki (http://wiki.php.net/internals/windows/stepbystepbuild) and its associated compilation environment references. However, I am still stuck trying to create the VC6 SP6 build environment. It seems Microsoft has deleted all references to their old development tools.
      
As
a result, the links in the Wiki are stale. Worse still, my Google skills have failed me. So far, I have managed to cobble together an installation of Visual
      
C++
6.0 and apply service pack 1. However, trying to apply either service packs 5 or 6 (could not find 2, 3, or 4) fail without any visibly helpful explanations. As expected, a build without service pack 6
      
fails
to link in the standard PHP binaries. It seems I am so close, but stuck pretty badly. Could some kind soul please give me a push in the right direction? Thanks, Chris Kukuchka Sequoia Group, Inc.
      
------------------------------------------------------------------------ ------
    
-------------------------------------
REGISTER NOW! | Virtual Inforum 2009 | Online at a desktop near you. |
      
October
20 - 21 | http://www.inforum2009.com
      
------------------------------------------------------------------------ ------
    
-------------------------------------
-- Windows Internals Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
      --
Windows Internals Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
    
------------------------------------------------------------------------------------------------------------------- REGISTER NOW! | Virtual Inforum 2009 | Online at a desktop near you. | October 20 - 21 | http://www.inforum2009.com -------------------------------------------------------------------------------------------------------------------

« previous php.internals.win (#628) next »