Apache 2 and PHP5 static module ?

This is a discussion on Apache 2 and PHP5 static module ? within the Apache Web Server forums, part of the Web Server and Related Forums category; I am trying to build my apache2 with PHP5 support embedded statically. When I do the same with Apache1 it ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-09-2005
Schraalhans Keukenmeester
 
Posts: n/a
Default Apache 2 and PHP5 static module ?

I am trying to build my apache2 with PHP5 support embedded statically.

When I do the same with Apache1 it is simple:
First I run ./configure in /install/apache-1.3.33
Then I run the following in /install/php-5.0.3:
../configure --with-apache=../apache-1.3.33 --enable-safe-mode
make
su -
make install

This puts a library in the apache tree which then is compiled and linked
statically in my apache binary using:

../configure --prefix=/usr/local/apache --disable-module=all
--server-uid=apache --server-gid=apache --enable-module=access
--enable-module=log_config --enable-module=dir --enable-module=mime
--enable-module=auth --activate-module=src/modules/php5/libphp5.a

This works like a charm.
Now I checked the PHP options for usage with apache2 and
../configure --help says about the available apache options:

--with-apxs[=FILE] Build shared Apache 1.x module.
--with-apache[=DIR] Build Apache 1.x module.
--with-apxs2filter[FILE]EXPERIMENTAL: Build shared Apache 2.0 module.
--with-apxs2[=FILE] EXPERIMENTAL: Build shared Apache 2.0 module.
--with-apache-hooks[=FILE]EXPERIMENTAL: Build shared Apache 1.x module.
--with-apache-hooks-static[=DIR]
EXPERIMENTAL: Build Apache 1.x module.
--disable-cli Disable building CLI version of PHP
--enable-embed[=TYPE] EXPERIMENTAL: Enable building of
embedded SAPI library

But when I chose apxs2 configure is trying to start apxs, and of course
my Apache isn't built yet, sinnce I want a statically included php.

When I try to use --with-apache it will however say:
error: Use --with-apache2 with Apache 2.x!

So this option, though not listed in --help _is_ available. However if I
use the --with-apache2=../httpd-2.0.52 option during configure it says
its building a CGI version and not a SAPI one. No includable files go
into the ../httpd-2.0.52 directory whatsoever.

Also tried using the --enable-embed option, but this also does not
produce the required library files for apache inclusion.

Who knows if/how it is possible to have a monolithic apache2 binary WITH
php5 support ??? I am at a loss and don't understand why it won't build
it just like with apache1. But then again, I am but a simple soul.

Thanks in advance!
Schraalhans.


  #2 (permalink)  
Old 01-09-2005
Schraalhans Keukenmeester
 
Posts: n/a
Default Re: Apache 2 and PHP5 static module ?

>
> Also tried using the --enable-embed option, but this also does not
> produce the required library files for apache inclusion.


BTW, I also tried using both --with-apache2 AND --enable-embed, this
results in a ton of errors during make. (undefined reference to sapi-module)

Schraalhans
  #3 (permalink)  
Old 01-09-2005
Davide Bianchi
 
Posts: n/a
Default Re: Apache 2 and PHP5 static module ?

On 2005-01-09, Schraalhans Keukenmeester <voornaam@hetepost.com> wrote:
> BTW, I also tried using both --with-apache2 AND --enable-embed, this


On www.php.net they talk about installing PHP5 on Apache 2 as a shared
module, but nothing as built-in. Usually I'd solve this by creating a
php directory in apache/src/modules, copying in it the source for the
module and adding it to the Configuration files in apache/src. But I've
never done with php5 and apache2, so if you want to try, feel free.

What's exactly the problem in using php as a shared module?

Davide

--
Windows is a pane in the ASCII.
  #4 (permalink)  
Old 01-09-2005
Schraalhans Keukenmeester
 
Posts: n/a
Default Re: Apache 2 and PHP5 static module ?

Davide Bianchi wrote:
> On 2005-01-09, Schraalhans Keukenmeester <voornaam@hetepost.com> wrote:
>
>>BTW, I also tried using both --with-apache2 AND --enable-embed, this

>
>
> On www.php.net they talk about installing PHP5 on Apache 2 as a shared
> module, but nothing as built-in. Usually I'd solve this by creating a
> php directory in apache/src/modules, copying in it the source for the
> module and adding it to the Configuration files in apache/src. But I've
> never done with php5 and apache2, so if you want to try, feel free.
>
> What's exactly the problem in using php as a shared module?
>
> Davide
>

I saw that too yes. That's what surprised me, no mentioning static use.
The reason is not really shocking, I just wanted to try, as I was happy
with the performance of the Apache1/static PHP support combination. I
have no experience yet with adding sources like this, but I will give it
a go nonetheless. Seems pretty straightforward after all. Good tip.
If I succeed I will post the results and probably add a page to my site
on this, since it isn't very widespread yet apparantly.

So I may be back for some more questions later ;-)
Thanks!

Schraalhans
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:07 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0