php-install Digest 17 Jan 2002 15:03:02 -0000 Issue 654
Topics (messages 5606 through 5613):
Dynamically restrict accesses to virtual hosts' documentroots
5606 by: Ole Tange
5610 by: Rasmus Lerdorf
5612 by: Ole Tange
Newbie prob: Getting 403.1 when using PHP under PWS in Win98
5607 by: Robert Moulton
mib location
5608 by: Ho, Kin Tak
Re: Need Help with PHP/Apache Installation.
5609 by: Christ Christoph (Erste)
PHP 4.1.x cannot compile with ssl
5611 by: Matthew Darcy
5613 by: Jon Wagoner
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 ---
I have a lot of virtual hosts. They are made with rewrite-engine so they
do not each have a <VirtualHost> section.
I would like for PHP to restrict access from PHP to $DOCUMENT_ROOT. Also I
would like to have / mean $DOCUMENT_ROOT.
This means that if http://www.example.com/foo/bar.php opens a file called
"/fubar.html" then this file will be the same as:
- http://www.example.com/fubar.html
- $DOCUMENT_ROOT/fubar.html
- /home/of/www.example.com/public_html/fubar.html
www.example.net lives on the same machine.
If http://www.example.net/baz/xyzzy.php opens a file called
"/quux/quuux.txt" then this file will be the same as:
- http://www.example.net/quux/quuux.txt
- $DOCUMENT_ROOT/quux/quuux.txt
- /home/of/www.example.net/public_html/quux/quuux.txt
What I am looking for is something that smells like chroot without
actually being it. It should be so dynamically because it will be
impossible to make all the <VirtualHost>-statements as VirtualHosts are
generated dynamically with the rewrite-engine.
I have looked into doc_root and it seems to do part of the trick - though
only statically. What I need is dynamically.
I am looking for a way to say:
doc_root = $DOCUMENT_ROOT (Calculated for each request. Not at boot time)
and prepend $DOCUMENT_ROOT to the file name for each file access that
starts with '/'.
I am sure others that host a lot of virtual hosts have the same problem,
but I have not been able to find the solution.
/Ole
--- End Message ---
--- Begin Message ---
open_basedir
On Thu, 17 Jan 2002, Ole Tange wrote:
> I have a lot of virtual hosts. They are made with rewrite-engine so they
> do not each have a <VirtualHost> section.
>
> I would like for PHP to restrict access from PHP to $DOCUMENT_ROOT. Also I
> would like to have / mean $DOCUMENT_ROOT.
>
> This means that if http://www.example.com/foo/bar.php opens a file called
> "/fubar.html" then this file will be the same as:
>
> - http://www.example.com/fubar.html
> - $DOCUMENT_ROOT/fubar.html
> - /home/of/www.example.com/public_html/fubar.html
>
> www.example.net lives on the same machine.
> If http://www.example.net/baz/xyzzy.php opens a file called
> "/quux/quuux.txt" then this file will be the same as:
>
> - http://www.example.net/quux/quuux.txt
> - $DOCUMENT_ROOT/quux/quuux.txt
> - /home/of/www.example.net/public_html/quux/quuux.txt
>
> What I am looking for is something that smells like chroot without
> actually being it. It should be so dynamically because it will be
> impossible to make all the <VirtualHost>-statements as VirtualHosts are
> generated dynamically with the rewrite-engine.
>
> I have looked into doc_root and it seems to do part of the trick - though
> only statically. What I need is dynamically.
>
> I am looking for a way to say:
>
> doc_root = $DOCUMENT_ROOT (Calculated for each request. Not at boot time)
>
> and prepend $DOCUMENT_ROOT to the file name for each file access that
> starts with '/'.
>
> I am sure others that host a lot of virtual hosts have the same problem,
> but I have not been able to find the solution.
>
>
> /Ole
>
>
> --
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--- End Message ---
--- Begin Message ---
On Thu, 17 Jan 2002, Rasmus Lerdorf wrote:
> open_basedir
I have looked at open_basedir and it seems not to solve my problem. I
might be wrong, but could you please include an example where open_basedir
is dynamically set to $DOCUMENT_ROOT? E.g. to make the below work (Setting
it to '.' will make case 2 fail).
> > This means that if http://www.example.com/foo/bar.php opens a file called
> > "/fubar.html" then this file will be the same as:
> >
> > - http://www.example.com/fubar.html
> > - $DOCUMENT_ROOT/fubar.html
> > - /home/of/www.example.com/public_html/fubar.html
> >
> > www.example.net lives on the same machine.
> > If http://www.example.net/baz/xyzzy.php opens a file called
> > "/quux/quuux.txt" then this file will be the same as:
> >
> > - http://www.example.net/quux/quuux.txt
> > - $DOCUMENT_ROOT/quux/quuux.txt
> > - /home/of/www.example.net/public_html/quux/quuux.txt
/Ole
PS. Rasmus, tak for dit foredrag i SSLUG i maj 2000.
--- End Message ---
--- Begin Message ---
I installed PHP but all scripts get rejected with a 403 error stating that
the directory doesn't allow executables. I double checked the permissions
in PWS and everything looks good. This seems to be a recurring problem
judging by a Google newsgroup search. What is the common solution to this
problem?
Thanks - Rob
--- End Message ---
--- Begin Message ---
Hello,
After I installed php under windows 2000 with IIS5, I would like to use
php_snmp.dll. My php installed dir is c:\php. c:\php\extensions and
c:\php\mibs contains dll files and mib files respectively.
when I write a simple snmpget function
<html><head><title>PHP Test</title></head>
<body>
<?php echo phpinfo(); ?>
<?php
$sysname = snmpget("10.8.1.33","68682112foa","system.sysname.0);
echo $sysname;
?>
</body></html>
My browser shows
Cannot find module (IP-MIB): At line 0 in (none) Cannot find module
(IF-MIB): At line 0 in (none) Cannot find module (TCP-MIB): At line 0 in
(none) Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module
(SNMPv2-MIB): At line 0 in (none) Cannot find module (SNMPv2-SMI): At line 0
in (none)
It seems mib files cannot be located. Could you please tell me where the mib
file show place ?
I have modified the php.ini
extension_dir = c:\php\extensions and uncomment extension=php_snmp.dll
Thanks
Tak
--- End Message ---
--- Begin Message ---
this is likely to be an error with not actual libraries. Check the
documentation, which libraries are necessary for PHP to compile
successfully. I doubt that the zend libraries are propperly installed, or
not at all.
-----Original Message-----
From: Impu [mailto:[EMAIL PROTECTED]]
Sent: 15. ledna 2002 17:56
To: [EMAIL PROTECTED]
Subject: [PHP-INST] Need Help with PHP/Apache Installation.
Hi,
I will highly appreciate anyone who can help me with this problem. I
am simply unable to get this going, and need somebody to point me to the
right direction. Really a network engineer, but need to launch some of my
project to the web to impress folks :))
By the way, since PHP came, I now see all the good application require
PHP...but only binary available is for Windows only :(((
Ok, here I go... My Server environment is HP-UX 10.20
Basically, I have downloaded PHP 4.0.6, Apache 1.3.22 and I already have
installed copy of mySQL 3.23.46. So, from PHP Directory, I ran this command
./configure --with-mysql=/usr/local/mysql --with-apache=../apache_1.3.22
configure runs and find various dependencies. In short, it finds gcc,
bison, gnu make and so on. No error at all during configure script.
But as soon as I run make, I get
Making all in Zend
make[1]: Entering directory `/mnt/i3107tis/D0003/source/php/php-4.0.6/Zend'
/bin/sh ../libtool --silent --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I../main
-DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2 -c zend_language_scanner.c
/bin/sh ../libtool --silent --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I../main
-DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2 -c zend_ini_scanner.c
/bin/sh ../libtool --silent --mode=link gcc -g -O2 -o libZend_c.la
zend_lang
uage_scanner.lo zend_ini_scanner.lo
/bin/sh ../libtool --silent --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I../main
-DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2 -c zend_language_parser.c
/bin/sh ../libtool --silent --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I../main
-DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2 -c zend_ini_parser.c
/bin/sh ../libtool --silent --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I../main
-DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2 -c zend_alloc.c
/bin/sh ../libtool --silent --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I../main
-DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2 -c zend_compile.c
/bin/sh ../libtool --silent --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I../main
-DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2 -c zend_constants.c
/bin/sh ../libtool --silent --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I../main
-DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2 -c zend_dynamic_array.c
/bin/sh ../libtool --silent --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I../main
-DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -g -c ./zend_execute.c
/bin/sh ../libtool --silent --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I../main
-DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2 -c zend_execute_API.c
zend_execute_API.c: In function `zend_set_timeout':
zend_execute_API.c:720: storage size of `t_r' isn't known
zend_execute_API.c:721: `sigset_t' undeclared (first use in this function)
zend_execute_API.c:721: (Each undeclared identifier is reported only once
zend_execute_API.c:721: for each function it appears in.)
zend_execute_API.c:721: parse error before "sigset"
zend_execute_API.c:726: `ITIMER_PROF' undeclared (first use in this
function)
zend_execute_API.c:728: `sigset' undeclared (first use in this function)
zend_execute_API.c:730: `SIG_UNBLOCK' undeclared (first use in this
function)
zend_execute_API.c: In function `zend_unset_timeout':
zend_execute_API.c:746: storage size of `no_timeout' isn't known
zend_execute_API.c:750: `ITIMER_PROF' undeclared (first use in this
function)
make[1]: *** [zend_execute_API.lo] Error 1
make[1]: Leaving directory `/mnt/i3107tis/D0003/source/php/php-4.0.6/Zend'
make: *** [all-recursive] Error 1
Thank you very much for your help!
Impu
[EMAIL PROTECTED]
--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hi,
I do the ./configure --with-openssl=/usr/bin (opensll is in /usr/bin)
I get configure error looking for evp.h
evp.h is in /usr/include/openssl
I do a ./configure --with-openssl=/usr/include/openssl
and it still comes back with an error cannot find evp.h
evp.h is in /usr/include/openssl - but configure can't find it.
Can any one help with ?
Thanks,
Matt.
--- End Message ---
--- Begin Message ---
Try doing just ./configure --with-openssl=/usr
The script usually tries to apply the subdirectories correctly, so you genererally
just need the main directory it's in.
-----Original Message-----
From: Matthew Darcy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 17, 2002 6:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP-INST] PHP 4.1.x cannot compile with ssl
Hi,
I do the ./configure --with-openssl=/usr/bin (opensll is in /usr/bin)
I get configure error looking for evp.h
evp.h is in /usr/include/openssl
I do a ./configure --with-openssl=/usr/include/openssl
and it still comes back with an error cannot find evp.h
evp.h is in /usr/include/openssl - but configure can't find it.
Can any one help with ?
Thanks,
Matt.
--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--- End Message ---