View previous topic :: View next topic |
Author |
Message |
burzmali Apprentice
Joined: 18 Apr 2002 Posts: 238 Location: ca
|
Posted: Thu May 23, 2002 2:29 am Post subject: apache 2 and php |
|
|
i installed apache2 from source manually and now i am trying to emerge php ontop of it. however, php ./config seems to want to run apxs -ltiff and that doesn't seem to be valid. apxs exists and is in my path. here is the output data:
Code: | Sorry, I was not able to successfully run APXS. Possible reasons:
1. Perl is not installed;
2. Apache was not compiled with DSO support (--enable-module=so);
3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs
The output of /usr/sbin/apxs -ltiff follows
Usage: apxs -g [-S <var>=<val>] -n <modname>
apxs -q [-S <var>=<val>] <query> ...
apxs -c [-S <var>=<val>] [-o <dsofile>] [-D <name>[=<value>]]
[-I <incdir>] [-L <libdir>] [-l <libname>] [-Wc,<flags>]
[-Wl,<flags>] <files> ...
apxs -i [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
apxs -e [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
configure: error: Aborting
|
any ideas on how to get around this? thanks in advance for any help. _________________ burzmali
www.burzmali.net |
|
Back to top |
|
|
roman n00b
Joined: 20 May 2002 Posts: 17
|
Posted: Thu May 23, 2002 5:59 am Post subject: Apache 2 and PHP |
|
|
Without big patching of ebuild files you have no chance, 'cause
php has another apxs options for apache 2. You will need
to unpack the php source and run ./configure --help for answer.
After you will know, what parameters you will need, patch the
ebuild file according to your wanted configuration...
Anyway, you MUST change the apxs switch to
Code: | --with-apxs2=/path/to/your/apache/bin/apxs |
Note also, that apache2 has another format of configure file.
Note also, that it is still experimentall...
I think, that for this purpose is better to compile apache2+php
outside of gentoo to /usr/local or /opt without using emerge system. |
|
Back to top |
|
|
wahuu n00b
Joined: 21 Apr 2002 Posts: 14 Location: Austria
|
Posted: Tue Jun 04, 2002 4:13 pm Post subject: fix for apxs |
|
|
Hi,
I had the same problem when I tried to install PHP. I figured out that -in my case- the problem was that the apxs script tried to access /usr/bin/envvars, which was installed to /usr/sbin/envvars. Creating a symlink fixed the issue for me. (ln -s /usr/sbin/envvars /usr/bin/envvars)
I have created a very experimental ebuild for Apache2. (pre-alpha) Please feel free to improve it and report any errors but let me warn you. It might not work for you. It does not even compy to the FHS.
http://wahuu.at/~db/downloads/httpd-2.0.36.ebuild
1.) Copy ebuild to /usr/portage/net-www/httpd/
2.) create digest: ebuild httpd-2.0.36.ebuild digest
3.) emerge httpd
To compile php4 just change --with-apxs => --with-apxs2 in the php ebuild.
Dominik
p.s. Please do not post bugs/errors with this ebuild on bugs.gentoo.org! |
|
Back to top |
|
|
Tuxisuau Apprentice
Joined: 04 May 2002 Posts: 213 Location: Catalunya (Europe)
|
Posted: Sun Jun 09, 2002 4:23 am Post subject: Why |
|
|
Why httpd and not "apache"?
Did you submit it?
Masked, it can perfectly be in portage, and that may become an incentive for other people to improve it too |
|
Back to top |
|
|
wahuu n00b
Joined: 21 Apr 2002 Posts: 14 Location: Austria
|
Posted: Sun Jun 09, 2002 10:45 pm Post subject: httpd vs. apache |
|
|
The reason for naming the ebuild "httpd" was simpy that the Apache package itself is named "httpd". Probably it is more intuitive to name it Apache ... I do not mind.
I have not submitted the ebuild yet. I wanted to discuss it with "woodchip" first but so far I have not received any mail reply.
Does the Apache2 (httpd) ebuild work for you guys?
Dom |
|
Back to top |
|
|
Tuxisuau Apprentice
Joined: 04 May 2002 Posts: 213 Location: Catalunya (Europe)
|
Posted: Mon Jun 10, 2002 12:54 am Post subject: sad |
|
|
emerge httpd -> apache
is like
emerge mailclient -> mutt
There are more httpd's than apache, and more mail clients than mutt (yes, really ;). |
|
Back to top |
|
|
wahuu n00b
Joined: 21 Apr 2002 Posts: 14 Location: Austria
|
Posted: Mon Jun 10, 2002 10:43 am Post subject: Good argument |
|
|
Hi Tuxisua,
the argument you pointed out is good and convinced me! I have already submitted the ebuild as apache-2.0.36.ebuild to https://bugs.gentoo.org.
Hasta luego,
Dominik |
|
Back to top |
|
|
theprog n00b
Joined: 19 Jun 2002 Posts: 15
|
Posted: Wed Jun 19, 2002 2:30 am Post subject: Here is an improvement to your ebuild for module choices |
|
|
Add this to the pkg_setup() function:
Code: | select_modules_config || \
die "couldn't find apache-builtin-mods config file" |
Add this to the bottom of the ebuild:
Code: |
parse_modules_config() {
local filename=$1
local name=""
local dso=""
local disable=""
[ -f ${filename} ] || return 1
einfo ">>> using ${filename} for builtins..."
for i in `cat $filename | sed "s/^#.*//"` ; do
if [ $i == "-" ] ; then
disable="true"
elif [ -z "$name" ] && [ ! -z "`echo $i | grep "mod_"`" ] ; then
name=`echo $i | sed "s/mod_//"`
elif [ "$disable" ] && ( [ $i == "static" ] || [ $i == "shared" ] ) ; th
en
MY_BUILTINS="${MY_BUILTINS} --disable-$name"
name="" ; disable=""
elif [ $i == "static" ] ; then
MY_BUILTINS="${MY_BUILTINS} --enable-$name=yes"
name="" ; disable=""
elif [ $i == "shared" ] ; then
MY_BUILTINS="${MY_BUILTINS} --enable-$name=shared"
name="" ; disable=""
fi
done
}
select_modules_config() {
parse_modules_config /etc/apache/apache-builtin-mods || \
parse_modules_config ${FILESDIR}/apache-builtin-mods || \
return 1
}
|
Then you can use the apache-builtin-mods just as before:
Code: |
mod_actions shared
mod_alias shared
mod_asis shared
mod_auth shared
|
|
|
Back to top |
|
|
|