#40425 [Opn]: php_getuid() always return 1.
| From: | tony2001@php.net | Date: | Sun, 11 Feb 2007 09:34:03 +0000 |
| Subject: | #40425 [Opn]: php_getuid() always return 1. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-108692@lists.php.net to get a copy of this message | ||
ID: 40425
Updated by: tony2001@php.net
Reported By: priappub at yahoo dot fr
Status: Open
Bug Type: Safe Mode/open_basedir
Operating System: Solaris 10
PHP Version: 5.2.1
New Comment:
Then we will have to wait for someone with Solaris 10 to reproduce and
fix it.
Previous Comments:
------------------------------------------------------------------------
[2007-02-10 01:35:19] priappub at yahoo dot fr
Unfortunately, this machine is on a private network.
It'a a solaris 10 update 3 with apache 2.0.58 included in
solaris. PHP is 5.2.1 compiled with:
CFLAGS='-I/usr/sfw/src/mysql/include' \
CC='cc' \
'./configure' \
'--with-apxs2=/usr/apache2/bin/apxs' \
'--with-mysql=/usr/sfw' \
'--enable-dbase' \
'--with-ldap' \
'--enable-ftp' \
'--with-bzip2' \
'--with-openssl=/usr/sfw' \
'--with-jepg' \
'--with-png' \
'--with-zlib' \
'--with-imap' \
'--enable-fastcgi' \
'--enable-mbstring' \
'--with-config-file-path=/etc/apache2' \
'--without-iconv' \
'--with-gettext' \
'--enable-magic-quotes' \
'--enable-safe-mode' \
'--prefix=/usr' \
'--exec-prefix=/usr' \
'--sysconfdir=/etc' \
'--localstatedir=/var' \
I'm using Sun Studio 11 but same result with GCC. I don't
know if the problem is on x86 too, I have only solaris with
sparc.
NB: bug 12683 suggests a problem with mod_perl but no
mod_perl here.
------------------------------------------------------------------------
[2007-02-10 00:52:28] tony2001@php.net
Cannot reproduce. Please provide an account on this machine.
------------------------------------------------------------------------
[2007-02-10 00:44:39] priappub at yahoo dot fr
Description:
------------
On solaris 10 (update 3) on sparc with PHP 5.1.6 or 5.1.2,
safe mode doesn't work. I have the message:
SAFE MODE Restriction in effect. The script whose uid/gid
is 1/10076 is not allowed to access /sites/toto.php owned
by uid/gid 10076/1000 in Unknown on line 0
The script and the directory have the same UID/GID. It
seems like in safe_mode.c, php-getuid() always returns 1
and php_getgid() returns the UID.
NB: same bug as http://bugs.php.net/bug.php?id=7744 or
http://bugs.php.net/bug.php?id=18500 (they are
old and for
PHP4)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40425&edit=1