Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache 2 + php 4: Did anybody made it work?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Tuxisuau
Apprentice
Apprentice


Joined: 04 May 2002
Posts: 213
Location: Catalunya (Europe)

PostPosted: Wed Aug 21, 2002 4:12 am    Post subject: Apache 2 + php 4: Did anybody made it work? Reply with quote

There's no official support for apache2 in php 4.2.2 but i've heard somewhere that is possible to install it.

Is it possible to use mod_php?

If not, or if you know, How do I install it as a cgi?
_________________
IM me at tuxisuau@jabber.7a69ezine.org
Back to top
View user's profile Send private message
EPrime
Tux's lil' helper
Tux's lil' helper


Joined: 10 Aug 2002
Posts: 80
Location: Denmark

PostPosted: Sat Aug 24, 2002 1:09 am    Post subject: Reply with quote

I managed to compile Apache 2.0.39 with mod_php 4.2.1 from source (using gcc 2.95 on Mandrake). For Apache, I used:

Code:
./configure --prefix=/usr/local --with-port=80 --enable-static-support --with-mpm=worker --enable-modules=all --enable-so --with-z=/usr/lib --with-ssl=/usr/local/ssl/lib --enable-mods-shared="auth_anon deflate expires headers info mime_magic proxy rewrite speling ssl php perl"

And for mod_php I used:

Code:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-pear --enable-safe-mode --with-openssl --with-zlib=shared --with-bz2=shared --enable-ftp=shared --with-pgsql=/usr/local/pgsql --with-mysql=/usr/local/mysql


You can probably skip specifying the paths to libraries (zlib, ssl, mysql, postgres) and might want to drop some of the --with stuff depending on your setup and desires.

Note: this did not work with 2.0.40 and mod_php 4.2.2, but might with a newer cvs snapshot of the php source. Give me a few days and I can post my findings when trying on the Gentoo box (now using gcc 3.2 :D).
Back to top
View user's profile Send private message
EPrime
Tux's lil' helper
Tux's lil' helper


Joined: 10 Aug 2002
Posts: 80
Location: Denmark

PostPosted: Sat Aug 24, 2002 1:17 am    Post subject: Reply with quote

Another thing - there's actually an ebuild for Apache2, you just need to unmask it by editing file /usr/portage/profiles/package.mask before emerge allows you to install it.

It might be masked for a good reason - such as it doesn't work or compile. Also, I have no idea how Gentoo handles having both 1.3 and 2.0 installed (since 2.0 is probably an upgrade rather than a new package), so if this is your plan installing from source into a separate location may be the best solution (mine is actually in /chroot/apache2).
Back to top
View user's profile Send private message
dreamer3
Guru
Guru


Joined: 24 Sep 2002
Posts: 553

PostPosted: Thu Oct 17, 2002 10:25 am    Post subject: Reply with quote

If you want Apache2 + PHP4... unmask Apache 2 and emerge... I had to create a symlink in the files dir from 2.0.40 to 2.0.43 to get it to emerge.

I went ahead an unmasked mod_PHP 4.2.3 although 4.2.2 should work. You will need to modify the configure section to appear like this:

Code:
./configure \
        ...
        --with-apxs2="/usr/lib/apache2/bin/apxs -ltiff" \
        ...


Note, PHP 4.2.x support for Apache 2 is still experimental though evidentally quite a few people are using it with much success. My emerge of mod_php-4.2.3 just completed successfully. :-)

EDIT: Ok, the ebuild needs a little more tweaking (all the files get put in the wrong places for Apache 2) and the auto-config is only for Apache 1.x so you'll have to edit some config files by hand to get it working, but at least it compiles :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum