php-install Digest 16 Mar 2003 11:55:03 -0000 Issue 1291
Topics (messages 10344 through 10345):
Help! Problem building PHP 4.3.1 with Apache 1.3.27 on Solaris 2.8
10344 by: Bob Boeninger
dynamic virtual hosting+open_basedir
10345 by: Furesz Peter
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Hello,
Didn't see either of these two problems I'm having building PHP 4.3.1
with Apache 1.3.27 on Solaris 2.8:
I've tried two recommended ways of building Apache with PHP:
...
5. cd apache_xxx
6. ./configure --prefix=/www --enable-module=so
7. make
8. make install
9. cd ../php-xxx
10. ./configure --with-mysql --with-apxs=<correct path>/apxs
11. make
12. make install
------------
When I get to step 10: ./configure --with-mysql --with-apxs=<correct
path>/apxs
I get the error:
Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS...
APXS: /opt/apache_March_13_2003/bin/apxs
CFLAGS: -g -O2
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 /opt/apache_March_13_2003/bin/apxs 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
--------------------
So, none of these 3 possibilities seem to pertain in my case. And how should
it be complaining about the way apxs is being called, since this should be
included in the configure file correctly, one would think.
============
The other recommended way of building everything is:
cd apache-1.3.27
./configure --prefix=/u1/apache_March_11_2003
That's all for apache for the moment. Now set up PHP:
-------------------
PHP:
cd php-4.3.1
./configure --enable-discard-path \
--prefix=/u1/apache_March_11_2003/php/ \
--with-apache=/u1/apache_March_11_2003/build/apache_1.3.27 \
gmake
gmake install
Then we go back and do another, fancier configure of apache:
./configure \
--activate-module=src/modules/php4/libphp4.a \
--enable-module=php4 \
--prefix=/u1/apache_March_11_2003
make
make install
----------
It's during this last 'configure' where I get the following error:
...
+ checking sizeof various data types
+ doing sanity check on compiler and options
** A test compilation with your Makefile configuration
** failed. The below error output from the compilation
** test will give you an idea what is failing. Note that
** Apache requires an ANSI C Compiler, such as gcc.
======== Error Output for sanity check ========
cd ..; gcc -DSOLARIS2=280 `./apaci` -o helpers/dummy
lpers/dummy.c -L/usr/ucblib -L/afs/.slac.stanford.edu/package/gcc/sun4x_56
/gcc-2.95.3/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3 -L/usr/oracle/lib -Lmodu
les/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4 -export-symbols
/opt/apache_March_11_2003/build/php-4.3.1/sapi/apache/php.sym -L/usr/ucbli
b -L/afs/.slac.stanford.edu/package/gcc/sun4x_56/gcc-2.95.3/lib/gcc-lib/spar
c-sun-solaris2.6/2.95.3 -L/usr/oracle/lib -lcrypt -lresolv -lm -ldl -lnsl
-lsocket -lgcc -lcrypt -lnsl -lsocket -lgen -ldl -lsched -lclntsh -locijdbc
8 -lnsl -lsocket -lgen -ldl -lsched -lclntsh -lsocket -lnsl -lpthread -lex
pat -ldl
ld: fatal: file
/opt/apache_March_11_2003/build/php-4.3.1/sapi/apache/php.sym: unknown file
type
ld: fatal: File processing errors. No output written to helpers/dummy
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `dummy'
============= End of Error Report =============
What's with this silly, innocuous 'php.sym' file? It's a one-line ASCII
file; nothing to it. Of course I have gcc, which works fine lots of places.
By the way, this procedure works fine with PHP 4.2.1 instead of 4.3.1,
which I'm trying to use here.
Why can't this just work properly instead causing so much grief?
Would anyone have any idea on what these two problems might be about?
Thanks,
Bob Boeninger
[EMAIL PROTECTED]
~
--- End Message ---
--- Begin Message ---
Hi!
I have a problem with my httpd.conf and PHP. I would like to make a free PHP
hosting. When a user register, I put into directory
/foo/bar/username.mydomain.com. My httpd.conf is the following:
<Directory /foo/bar>
AllowOverride None
Options None
php_admin_value max_execution_time 30
#The following line is my QUESTION !!!
php_admin_value open_basedir .
</Directory>
<VirtualDocumentRoot aaa.bbb.ccc.ddd>
VirtualDocumentRoot /foo/bar/%0
</VirtualHost>
BUT if the user "foobar" (dir: /foo/bar/foobar.mydomain.com) have a directory name
"include" (/foo/bar/foobar.mydomain.com/includes),
he can't be able to reach the parent directory from includes, like
include("../config.php"); becouse open_basedir restriction in affect.
So I have to SET dynamicly open_basedir for every user. I have to simulate this
line's, but dont't know how?
user1: php_admin_value open_basedir "/foo/bar/user1.mydomain.com"
user2: php_admin_value open_basedir "/foo/bar/user2.mydomain.com"
.
.
.
userN: php_admin_value open_basedir "/foo/bar/userN.mydomain.com"
--- End Message ---